Aplikasi Web ini ditujukan kepada pihak instansi kesehatan untuk mempermudah pengelolaan pasien gejala Hipoksia yang sering diderita oleh pasien Covid-19 saat ini. Fitur yang ditawarkan pada aplikasi web ini adalah pengelolaan data pasien, mengetahui lokasi pasien yang melakukan monitoring, data rekam medis pasien, dan daftar kontak erat yang dimiliki oleh pasien yang diisi melalui aplikasi android yang terintegrasi dengan aplikasi web ini.
Aplikasi web ini terintegrasi dengan aplikasi android yang digunakan oleh pasien. Pasien melakukan proses pendaftaran akun dan pengisian identitas diri sebelum dapat melakukan monitoring. Fitur dari aplikasi ini adalah memantau hasil monitoring, mengetahui lokasi pasien, mengetahui hasil diagnosa berdasarkan monitoring, rekomendasi penanganan lanjut dari dokter, dan melakukan pengisian form kontak erat jika pasien mengalami gejala Hipoksia. Aplikasi android ini selain terintegrasi dengan web, juga terintegrasi dengan perangkat Hardware untuk mengambil data parameter yang terkait dengan gejala Hipoksia.
Hardware yang terintegrasi ini bertugas untuk mendapatkan data saturasi oksigen dalam darah (Spo2) dan denyut jantung per menit (Bpm). Hardware ini berbasiskan mikrokontroler ESP8266 yang mengirimkan data Spo2 dan Bpm ke platform web (Thingspeak). Data kemudian akan diakses oleh aplikasi android saat pasien melakukan monitoing dan disimpan ke website Hipoksia. Proses pemantauan pasien dilakukan sebanyak 3 kali sekali dalam 24 jam selama 10 - 15 detik untuk sekali monitoring.
1. buka git bash
2. git clone https://github.com/yofan2408/manajemen_pasien_gejala_hipoksia.git
3. cd manajemen_pasien_gejala_hipoksia
4. composer install
5. npm install
6. npm run dev
7. buat database di php my admin
8. ubah nama file .env.example menjadi .env
9. php artisan key:generate
10. setup database .env
11. php artisan migrate --seed
12. php artisan passport:install
13. php artisan schedule:work
14. php artisan serv
- Manajemen Pasien Gejala Hipoksia Terintegrasi Berbasis Web
- Cara Install
- API Android
- API Hardware
- Autentikasi
- Reset Password
- Kontak Erat
- Notifikasi
- Topic Notification
- Update Topic
- Value = ID Topic
- Delete Topic
- Value = ID Topic
- Get All Topics
- Firebase Token Notification
- Topic Notification
- Device
- Monitoring
- Geolokasi
- Medical Record
- Pulse Oximetry
Request :
- Method : POST
- Endpoint : 'patient/v1/login'
- Header :
- Content-Type : application/json
- Body
{
"email": "[email protected]",
"password": "example_password"
}
Response :
- Success
{
"code": 200,
"status": "berhasil",
"Topic_type": "Bearer",
"access_token": "example_token",
"token_id": "example_token_id",
"user": {
"id": "user_id",
"name": "example_name",
"email": "[email protected]",
"created_at": "2021-02-17T16:16:36.000000Z",
"updated_at": "2021-02-17T16:16:36.000000Z"
}
}
- Error
{
"code": 400,
"status": "gagal",
"message": "pesan gagal"
}
Request :
- Method : POST
- Endpoint : 'patient/v1/register'
- Header :
- Content-Type : application/json
- Body
{
"name": "example name",
"email": "[email protected]",
"password": "example_password",
"password_confirmation": "example_password"
}
Response :
- Success
{
"code": 201,
"status": "berhasil",
"token_type": "Bearer",
"access_token": "example_token",
"token_id": "example_token_id",
"user": {
"id": "user_id",
"name": "example_name",
"email": "[email protected]",
"created_at": "2021-02-17T16:16:36.000000Z",
"updated_at": "2021-02-17T16:16:36.000000Z"
}
}
- Error
{
"code": 400,
"status": "gagal",
"message": "pesan gagal"
}
Request :
- Method : POST
- Endpoint : 'patient/v1/logout'
- Header :
- Content-Type : application/json
- Body
{
"token_id": "example_token_id"
}
Response :
- Success
{
"code": 200,
"status": "berhasil",
"message": "pesan logout"
}
- Error
{
"code": 400,
"status": "gagal",
"message": "pesan logout"
}
Request :
- Method : POST
- Endpoint : 'patient/update'
- Header :
- Content-Type : application/json
- Authorization : Bearer
- Body
{
"nama": "nama_pasien",
"jenis_kelamin": "jenis_kelamin_pasien",
"nik": "nik pasien",
"alamat": "alamat_pasien",
"tanggal_lahir": "tanggal_lahir_pasien",
"phone": "nomor_telepon_pasien"
}
Response :
- Success
{
"code": 200,
"status": "berhasil",
"message": "data pasien telah di update",
"user": {
"id": 1,
"name": "nama_paisen",
"email": "email_pasien",
"nik" : "nik pasien",
"jenis_kelamin": "jenis_kelamin_pasien",
"alamat": "alamat_pasien",
"tangggal_lahir": "tanggal_lahir_pasien",
"phone": "nomor_telepon_pasien",
"created_at": "2021-02-18T07:44:04.000000Z",
"updated_at": "2021-02-18T07:45:46.000000Z"
}
}
- Error
{
"code": 400,
"status": "gagal",
"message": "pesan update"
}
Request :
- Method : POST
- Endpoint : 'patient/add-profile-photo'
- Header :
- Content-Type : application/json
- Authorization : Bearer
- Body
{
"photo": "base64 format"
}
Response :
- Success
{
"code": 200,
"status": "berhasil",
"message": "pesan berhasil",
"user": {
"id": 1,
"name": "nama_pasien",
"photo": "namafoto.jpg",
"created_at": "2021-02-18T05:30:33.000000Z",
"updated_at": "2021-02-19T04:09:55.000000Z"
}
}
- Error
{
"code": 400,
"status": "gagal",
"message": "pesan error upload foto"
}
Request :
- Method : POST
- Endpoint : 'patient/user-profile'
- Header :
- Content-Type : application/json
- Authorization : Bearer
Response :
- Success :
{
"code": 200,
"status": "berhasil",
"message": "data:image/png;base64,random_string_base64"
}
- Error :
{
"code": 400,
"status": "gagal",
"message": "gambar gagal diupload"
}
Request :
- Method: GET
- Endpoint : 'patient/bio'
- Header :
- Content-Type : application/json
- Authorization : bearer
- Body:
Patient ID
{
"id" : 1
}
Response:
- Success:
{
"code": 200,
"status": "berhasil",
"message": "data pasien berhasil ditamabahkan",
"user": {
"id": 1,
"name": "nama_paisen",
"email": "email_pasien",
"nik": "nik pasien",
"jenis_kelamin": "jenis_kelamin_pasien",
"alamat": "alamat_pasien",
"tangggal_lahir": "tanggal_lahir_pasien",
"phone": "nomor_telepon_pasien"
}
}
- Failed:
{
"code": 400,
"status": "gagal",
"mesage": "pasien belum terdaftar"
}
Request :
- Method : POST
- Endpoint : 'patient/v1/forgot-password'
- Header :
- Content-Type : application/json
- Body:
{
"email": "[email protected]"
}
Response :
- Success
{
"code": 200,
"status": "berhasil",
"token": "reset password token"
}
- Failed
{
"code": 400,
"status": "gagal",
"message": "error message"
}
- Method : POST
- Endpoint : 'patient/v1/reset-password'
- Header :
- Content-Type : application/json
- Body:
{
"password": "new password",
"password_confirmation": "confirmation password",
"token": "reset password token"
}
Response :
- Success :
{
"code": 200,
"status": "success",
"message": "password reset successful"
}
- Failed:
{
"code": 400,
"status": "failed",
"message": "check your param or invalid token"
}
Request:
- Method: POST
- Endpoint: 'patient/kontak/insert'
- Header:
- Authorization: Bearer
- Content-Type: application/json
- Body:
{
"address": "alamat lokasi",
"name": "nama orang (jika dikenal)",
"relationship": "hubungan (teman, saudara, dll)",
"duration": "pekiraan durasi (menit / jam)",
"time": "jam waktu kontak erat terjadi",
"date": "tanggal waktu kontak erat terjadi",
"latitude": "latitude",
"longitude": "longitude"
}
Response:
- Success:
{
"code": 200,
"status": "berhasil",
"message": "kontak erat berhasil disimpan"
}
- Failed:
{
"code": 400,
"status": "gagal",
"message": "kontak erat gagal disimpan"
}
Request :
- Method : POST
- Endpoint : 'patient/topic/update'
- Header :
- Authorization: Bearer
- Content-Type: application/json
- Body:
{
"topic": 2
}
Response:
- Success:
{
"code": 200,
"status": "berhasil",
"message": "topic berhasil diupdate"
}
- Failed:
{
"code": 400,
"status": "gagal",
"message": "topic gagal diupdate"
}
Request:
- Method: POST
- Endpoint: 'patient/topic/delete'
- Header:
- Authorizaton: Bearer
- Content-Type: application/json
- Body:
{
"topic": 2
}
Response:
- Success:
{
"code": 200,
"status": "berhasil",
"message": "topic berhasil dihapus"
}
- Failed:
{
"code": 400,
"status": "gagal",
"message": "topic gagal dihapus"
}
Request:
- Method: POST
- Endpoint: 'patient/topic/topics'
- Header:
- Authorizaton: Bearer
- Content-Type: application/json
Response:
- Success:
{
"code": 200,
"status": "berhasil",
"topics": [
{
"id": 1,
"device_id": 1,
"notification_topic_id": 1,
"title": "Waktunya Monitoring",
"description": "Saatnya melakukan monitoring kadar saturasi anda, lakukan dengan durasi 1 menit",
"image": "",
"created_at": "2021-06-07T07:27:14.000000Z",
"updated_at": "2021-06-07T07:27:14.000000Z",
"pivot": {
"patient_id": 1,
"notification_template_id": 1,
"created_at": "2021-06-07T07:48:45.000000Z",
"updated_at": "2021-06-07T07:48:45.000000Z"
}
},
{
"id": 2,
"device_id": 1,
"notification_topic_id": 2,
"title": "Hasil Monitoring",
"description": "Monitoring selesai silahkan lihat hasil dan solusi penanganan yang diberikan",
"image": "",
"created_at": "2021-06-07T07:27:14.000000Z",
"updated_at": "2021-06-07T07:27:14.000000Z",
"pivot": {
"patient_id": 1,
"notification_template_id": 2,
"created_at": "2021-06-07T12:09:22.000000Z",
"updated_at": "2021-06-07T12:09:22.000000Z"
}
}
]
}
- Failed:
{
"code": 400,
"status": "gagal",
"message": "topic tidak ada"
}
Request:
- Method: POST
- Endpoint: 'patient/token/v1/update'
- Header:
- Authorization: Bearer
- Content-Type: application/json
- Body:
{
"firebaseApiToken": "firebase_token"
}
Response:
- Success:
{
"code": 200,
"status": "berhasil",
"message": "token berhasil update"
}
- Gagal:
{
"code": 400,
"status": "gagal",
"message": "token gagal diupdate"
}
Request:
- Method: POST
- Endpoint: 'patient/token/v1/delete'
- Header:
- Authorization: Bearer
- Content-Type: application/json
- Body:
{
"firebaseApiToken": "firebase_token"
}
Response:
- Success:
{
"code": 200,
"status": "berhasil",
"message": "token berhasil dihapus"
}
- Gagal:
{
"code": 400,
"status": "gagal",
"message": "token gagal dihapus"
}
- Method : POST
- Endpoint : 'patient/hardware/create'
- Header :
- Content-Type : application/json
- Authorization: Bearer
- Body:
{
"serial_number" : "serial_number_hardware"
}
Response:
- Success:
{
"code": 200,
"status": "berhasil",
"message": "device berhasil ditambahkan",
"device": "serial_number"
}
- Failed:
{
"code": 400,
"status": "gagal",
"message": "device gagal ditambahkan",
}
- Method: POST
- Endpoint: 'patient/hardware/enable' (menyalakan perangkat = 1)
- Endpoint: 'patient/hardware/disable' (mematikan perangkat = 0)
- Header:
- Content-Type : application/json
- Authorization : Bearer
- Body:
{
"status" : "0/1",
}
Response :
- Success:
{
"code" : 200,
"status" : "berhasil",
"message" : "device berhasil diaktifkan/dinonaktifkan"
}
- Failed :
{
"code" : 400,
"status" : "gagal",
"message" : "device gagal diaktifkan/dinonaktifkan"
}
- Method: POST
- Endpoint: 'patient/hardware/serial-number'
- Header:
- Content-Type : application/json
- Authorization : Bearer
- Body:
Response :
- Success:
{
"code" : 200,
"status" : "berhasil",
"serial_number" : "serial number device"
}
- Failed :
{
"code" : 400,
"status" : "gagal",
"message" : "belum terdaftar"
}
Request:
- Method: GET
- Endpoint: /patient/monitoring
- Header:
- Content-Type : application/json
- Body:
{
"patient_id" : 1
}
Response:
- Success
{
"code": 200,
"status": "success",
"monitoring_result": {
"averrage_spo2": "99",
"status": "normal",
"recomendation": "tetap jaga kesehatan anda dengan patuhi protokol kesehatan"
}
}
- Failed
{
"code": 400,
"status": "gagal",
"monitoring_result": "belum melakukan monitoring"
}
Request:
- Method: POST
- Endpoint: 'patient/geo-update'
- Header:
- Content-Type: application/json
- Authorization: Bearer
- Body:
{
"latitude": "8,1232732293",
"longitude": "-14458029463"
}
Response:
- Success:
{
"code": 200,
"message": "success",
"latitude": "8,1232732293",
"longitude": "-14458029463"
}
- Failed:
{
"code": 200,
"status": "failed",
"message": "update location failed"
}
Request:
- Method: GET
- Endpoint: 'patient/geolocation/all'
- Header:
- Content-Type: application/json
- Authorization: Bearer
- Body: none
Response:
- Success:
{
"code": 200,
"status": "berhasil",
"data": [
{
"id": 1,
"name": "Niki",
"latitude": "-8.458808283281881",
"longitude": "114.25944812277316"
},
{
"id": 2,
"name": "Yoyo",
"latitude": "-8.507765383320798 ",
"longitude": "114.25307836641305"
}
]
}
- Failed:
{
"code": 400,
"status": "failed",
"message": "tidak ada pasien lain yang terdaftar"
}
- Method: GET
- Endpoint: 'patient/record'
- Header :
- Content-Type : application/json
- Body:
{
"patient_id": 1
}
Response
- Success
{
"code": 200,
"status": "success",
"patient": {
"id": 1,
"name": "Niki",
"phone": "123456789",
"photo": "profiles/1626400419.png",
"email": "[email protected]",
"jenis_kelamin": "Laki - Laki",
"tanggal_lahir": "24-08-1999",
"alamat": "Banyuwangi"
},
"monitoring_location": {
"latitude": "-8.458808283281881",
"longitude": "114.25944812277316"
},
"close_contacts": [
{
"id": 1,
"patient_id": 1,
"address": "Jalan Raya Jember No.KM13, Kawang, Labanasem, Kec. Kabat, Kabupaten Banyuwangi, Jawa Timur 68461",
"name": "nini",
"relationship": "saudara",
"duration": "2 menit",
"time": "10:02",
"date": "2021-09-21",
"latitude": "-8.318773711922141",
"longitude": "114.28271462612766",
"created_at": "2021-07-16T03:02:19.000000Z",
"updated_at": "2021-07-16T03:02:19.000000Z"
},
{
"id": 2,
"patient_id": 1,
"address": "Jalan Raya Jember No.KM13, Kawang, Labanasem, Kec. Kabat, Kabupaten Banyuwangi, Jawa Timur 68461",
"name": "nunu",
"relationship": "saudara",
"duration": "2 menit",
"time": "10:02",
"date": "2021-09-22",
"latitude": "-8.318773711922141",
"longitude": "114.28271462612766",
"created_at": "2021-07-16T03:03:02.000000Z",
"updated_at": "2021-07-16T03:03:02.000000Z"
}
],
"device_type": "Pulse Oximetry",
"monitoring_result": [
{
"id": 1,
"patient_id": 1,
"averrage_spo2": "99",
"averrage_bpm": "120",
"status": "normal",
"recomendation": "tetap jaga kesehatan anda dengan patuhi protokol kesehatan",
"created_at": "18, Jul 2021 15:20",
"updated_at": "18, Jul 2021 15:20"
},
{
"id": 2,
"patient_id": 1,
"averrage_spo2": "99",
"averrage_bpm": "120",
"status": "normal",
"recomendation": "tetap jaga kesehatan anda dengan patuhi protokol kesehatan",
"created_at": "18, Jul 2021 15:21",
"updated_at": "18, Jul 2021 15:21"
}
]
}
- Failed
{
"code" : 400,
"status": "failed",
"message": "anda belum melakukan monitoring sebanyak 3 kali"
}
- Method: POST
- Endpoint: 'patient/record/delete'
- Header :
- Content-Type : application/json
Response
- Success:
{
"code" : 200,
"status": "berhasil",
"message": "rekam medis berhasil dihapus"
}
- Failed
{
"code" : 400,
"status": "failed",
"message": "rekam medis gagal di hapus"
}
- Method : POST
- Endpoint : 'oximetry/insert'
- Header :
- Content-Type : application/json
- Body:
{
"serial_number" : "serial_number_device",
"spo2": 99,
"bpm": 90,
"latitude": 2174217214,
"longitude": 21429114204,
"backup": "file-backup.txt"
}
Response
- Success:
{
"message" : "data berhasil di simpan"
}
{
"message": "aktifkan button monitoring di aplikasi android"
}
- Method : GET
- Endpoint : 'oximetry/data'
- Header :
- Content-Type : application/json
- Body :
{
"serial_number" : "serial_number_device"
}
Response :
- Success :
{
"code": 200,
"data": [
{
"id": 1,
"user_device_id": 1,
"spo2": "99",
"bpm": "100",
"created_at": "2021-05-05T11:26:19.000000Z",
"updated_at": "2021-05-05T11:26:19.000000Z"
},
{
"id": 2,
"user_device_id": 1,
"spo2": "99",
"bpm": "100",
"created_at": "2021-05-05T11:26:29.000000Z",
"updated_at": "2021-05-05T11:26:29.000000Z"
},
]
}
- Failed
{
"code": 400,
"status": "gagal",
"message": "Device tidak terdaftar"
}
- Method : GET
- Endpoint : '/sensor/detail?id= (id_rekam_medis)'
- Header :
- Content-Type : application/json
Response :
- Success :
{
"code": 200,
"data_pengukuran": {
"pengukuran_1": [
{
"spo2": "99",
"bpm": "120",
"longitude": "010101010101",
"latitude": "010101010101",
"created_at": "2022-01-30T17:15:52.000000Z"
},
{
"spo2": "96",
"bpm": "118",
"longitude": "010101010101",
"latitude": "010101010101",
"created_at": "2022-01-30T17:15:55.000000Z"
},
],
"pengukuran_2": [
{
"spo2": "74",
"bpm": "40",
"longitude": "010101010101",
"latitude": "010101010101",
"created_at": "2022-01-30T17:16:37.000000Z"
},
{
"spo2": "99",
"bpm": "67",
"longitude": "010101010101",
"latitude": "010101010101",
"created_at": "2022-01-30T17:16:40.000000Z"
},
],
"pengukuran_3": [
{
"spo2": "99",
"bpm": "120",
"longitude": "010101010101",
"latitude": "010101010101",
"created_at": "2022-01-30T17:16:57.000000Z"
},
{
"spo2": "99",
"bpm": "120",
"longitude": "010101010101",
"latitude": "010101010101",
"created_at": "2022-01-30T17:17:00.000000Z"
},
]
}
}