Webservice sederhana untuk keperluan pembelajaran pemrograman webservice di ITB STIKOM Bali, MK Perancangan Web dan Pemrograman Web.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

173 lines
2.8 KiB

2 years ago
2 years ago
  1. # Webservices Poliklinik Mangusada
  2. ## Latihan Pemrograman Webservices
  3. > **Disclaimer:**
  4. >
  5. > Webservices ini dibuat untuk keperluan pembelajaran. Data yang disediakan merupakan data fiktif. Mohon digunakan secara bijak.
  6. *Live version* dapat diakses di [BakPasir](https://mangusada.bakpasir.web.id).
  7. ---
  8. ## Konstruksi Umum
  9. Semua request service dilakukan melalui
  10. ```
  11. {BASE_URL} : http://mangusada.bakpasir.web.id/
  12. ```
  13. Method yang digunakan adalah `GET` atau `POST` tergantung jenis request.
  14. Response service adalah data dalam format JSON, berupa JSON object dengan property pertama adalah `status`. Property `status` menunjukkan status berhasil atau tidaknya request mendapatkan data. Jika berhasil mendapatkan data, maka `status` akan bernilai `1` diikuti dengan property `data` yang berisi data hasil request. Namun jika gagal, maka `status` akan bernilai `0`.
  15. **Response berhasil**
  16. ```
  17. {"status":1, "data": ... }
  18. ```
  19. **Response gagal**
  20. ```
  21. {"status":0}
  22. ```
  23. ---
  24. ## Informasi Daftar Dokter
  25. ```
  26. Method : GET
  27. URL : {BASE_URL}/dokter/{id_poliklinik}
  28. Content-Type : application/json
  29. ```
  30. **Contoh:**
  31. ```
  32. http://mangusada.bakpasir.web.id/dokter/2
  33. ```
  34. **Hasil:**
  35. ```
  36. {"status":1, "data":[{"id":"5", "nama":"dr. Budiman", ... }, ... ]}
  37. ```
  38. ---
  39. ## Informasi Jadwal Dokter
  40. ```
  41. Method : GET
  42. URL : {BASE_URL}/jadwal/{id_dokter}
  43. Content-Type : application/json
  44. ```
  45. **Contoh:**
  46. ```
  47. http://mangusada.bakpasir.web.id/jadwal/5
  48. ```
  49. **Hasil:**
  50. ```
  51. {"status":1, "data":[{"id":"6", "id_dokter":"5", "hari":"2", "mulai":"17:00:00", ... }, ... ]}
  52. ```
  53. ---
  54. ## Informasi Daftar Jaminan
  55. ```
  56. Method : GET
  57. URL : {BASE_URL}/jaminan
  58. Content-Type : application/json
  59. ```
  60. **Contoh:**
  61. ```
  62. http://mangusada.bakpasir.web.id/jaminan
  63. ```
  64. **Hasil:**
  65. ```
  66. {"status":1, "data":[{"id":"4", "nama":"BPJS", ... }, ... ]}
  67. ```
  68. ---
  69. ## Informasi Data Pasien
  70. ```
  71. Method : GET
  72. URL : {BASE_URL}/pasien/{no_rekam_medis}
  73. Content-Type : application/json
  74. ```
  75. **Contoh:**
  76. ```
  77. http://mangusada.bakpasir.web.id/pasien/510303200000023
  78. ```
  79. **Hasil:**
  80. ```
  81. {"status":1, "data":{"id":"7", "rm":"510303200000023", "nik":"5102044311820002", "nama":"Ni Nyoman Mariawati", ... }}
  82. ```
  83. ---
  84. ## Informasi Daftar Poliklinik
  85. ### Semua Poliklinik
  86. ```
  87. Method : GET
  88. URL : {BASE_URL}/poliklinik
  89. Content-Type : application/json
  90. ```
  91. **Contoh:**
  92. ```
  93. http://mangusada.bakpasir.web.id/poliklinik
  94. ```
  95. **Hasil:**
  96. ```
  97. {"status":1, "data":[{"id":"4", "nama":"Klinik Anak", "type":"2"}, ... ]}
  98. ```
  99. ### Poliklinik Menurut Type
  100. ```
  101. Method : GET
  102. URL : {BASE_URL}/poliklinik/{type}
  103. Content-Type : application/json
  104. ```
  105. **Contoh:**
  106. ```
  107. http://mangusada.bakpasir.web.id/poliklinik/2
  108. ```
  109. **Hasil:**
  110. ```
  111. {"status":1, "data":[{"id":"4", "nama":"Klinik Anak", "type":"2"}, ... ]}
  112. ```
  113. ---
  114. ## To Do List:
  115. 1. Pendaftaran Pasien (Method: `POST`)
  116. 2. Auth pengguna
  117. 3.