haddy315

Appointments Endpoints

Sep 15th, 2022
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.82 KB | None | 0 0
  1. {
  2. "info": {
  3. "_postman_id": "bea353f2-acff-40fb-a303-e563a11a7d29",
  4. "name": "New Collection",
  5. "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
  6. "_exporter_id": "9064607"
  7. },
  8. "item": [
  9. {
  10. "name": "Get all appointments",
  11. "request": {
  12. "auth": {
  13. "type": "basic",
  14. "basic": [
  15. {
  16. "key": "password",
  17. "value": "Admin123",
  18. "type": "string"
  19. },
  20. {
  21. "key": "username",
  22. "value": "Admin",
  23. "type": "string"
  24. }
  25. ]
  26. },
  27. "method": "GET",
  28. "header": [],
  29. "url": {
  30. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointment/all",
  31. "protocol": "https",
  32. "host": [
  33. "dev3",
  34. "openmrs",
  35. "org"
  36. ],
  37. "path": [
  38. "openmrs",
  39. "ws",
  40. "rest",
  41. "v1",
  42. "appointment",
  43. "all"
  44. ]
  45. }
  46. },
  47. "response": []
  48. },
  49. {
  50. "name": "Get all appointment by date",
  51. "request": {
  52. "method": "GET",
  53. "header": [],
  54. "url": {
  55. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointment/all?forDate=2022-08-02T00:00:00.0Z",
  56. "protocol": "https",
  57. "host": [
  58. "dev3",
  59. "openmrs",
  60. "org"
  61. ],
  62. "path": [
  63. "openmrs",
  64. "ws",
  65. "rest",
  66. "v1",
  67. "appointment",
  68. "all"
  69. ],
  70. "query": [
  71. {
  72. "key": "forDate",
  73. "value": "2022-08-02T00:00:00.0Z"
  74. }
  75. ]
  76. }
  77. },
  78. "response": []
  79. },
  80. {
  81. "name": "Save Appointment",
  82. "request": {
  83. "method": "POST",
  84. "header": [],
  85. "body": {
  86. "mode": "raw",
  87. "raw": "{\n \"providerUuid\": \"823fdcd7-3f10-11e4-adec-0800271c1b75\",\n \"appointmentNumber\": \"1\",\n \"patientUuid\": \"2c33920f-7aa6-48d6-998a-60412d8ff7d5\",\n \"serviceUuid\": \"c36006d4-9fbb-4f20-866b-0ece245615c1\",\n \"startDateTime\": \"2017-07-20\",\n \"endDateTime\": \"2017-07-20\",\n \"appointmentKind\": \"WalkIn\",\n \"providers\": [\n {\n \"uuid\": \"2d15071d-439d-44e8-9825-aa8e1a30d2a2\",\n \"comments\": \"available\",\n \"response\": \"ACCEPTED\"\n }\n ]\n}",
  88. "options": {
  89. "raw": {
  90. "language": "json"
  91. }
  92. }
  93. },
  94. "url": {
  95. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointment",
  96. "protocol": "https",
  97. "host": [
  98. "dev3",
  99. "openmrs",
  100. "org"
  101. ],
  102. "path": [
  103. "openmrs",
  104. "ws",
  105. "rest",
  106. "v1",
  107. "appointment"
  108. ]
  109. }
  110. },
  111. "response": []
  112. },
  113. {
  114. "name": "Get all non-cancelled, non-voided future appointment by appointmentServiceUuid",
  115. "request": {
  116. "method": "GET",
  117. "header": [],
  118. "url": {
  119. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointment/futureAppointmentsForServiceType?appointmentServiceTypeUuid=678906e5-9fbb-4f20-866b-0ece24564578",
  120. "protocol": "https",
  121. "host": [
  122. "dev3",
  123. "openmrs",
  124. "org"
  125. ],
  126. "path": [
  127. "openmrs",
  128. "ws",
  129. "rest",
  130. "v1",
  131. "appointment",
  132. "futureAppointmentsForServiceType"
  133. ],
  134. "query": [
  135. {
  136. "key": "appointmentServiceTypeUuid",
  137. "value": "678906e5-9fbb-4f20-866b-0ece24564578"
  138. }
  139. ]
  140. }
  141. },
  142. "response": []
  143. },
  144. {
  145. "name": "Count appointment per service type in a date range",
  146. "request": {
  147. "method": "GET",
  148. "header": [],
  149. "url": {
  150. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointment/appointmentSummary?startDate=2022-08-02T00:00:00.0Z&endDate=2022-08-02T00:00:00.0Z",
  151. "protocol": "https",
  152. "host": [
  153. "dev3",
  154. "openmrs",
  155. "org"
  156. ],
  157. "path": [
  158. "openmrs",
  159. "ws",
  160. "rest",
  161. "v1",
  162. "appointment",
  163. "appointmentSummary"
  164. ],
  165. "query": [
  166. {
  167. "key": "startDate",
  168. "value": "2022-08-02T00:00:00.0Z"
  169. },
  170. {
  171. "key": "endDate",
  172. "value": "2022-08-02T00:00:00.0Z"
  173. }
  174. ]
  175. }
  176. },
  177. "response": []
  178. },
  179. {
  180. "name": "Search appointments by serviceUuid (POST Request)",
  181. "request": {
  182. "method": "POST",
  183. "header": [],
  184. "body": {
  185. "mode": "raw",
  186. "raw": "{\n \"serviceUuid\": \"c36006e5-9fbb-4f20-866b-0ece245615a6\"\n}",
  187. "options": {
  188. "raw": {
  189. "language": "json"
  190. }
  191. }
  192. },
  193. "url": {
  194. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointment/search",
  195. "protocol": "https",
  196. "host": [
  197. "dev3",
  198. "openmrs",
  199. "org"
  200. ],
  201. "path": [
  202. "openmrs",
  203. "ws",
  204. "rest",
  205. "v1",
  206. "appointment",
  207. "search"
  208. ]
  209. }
  210. },
  211. "response": []
  212. },
  213. {
  214. "name": "Create audit info when appointment is editted",
  215. "request": {
  216. "method": "POST",
  217. "header": [],
  218. "body": {
  219. "mode": "raw",
  220. "raw": "{\n \"uuid\": \"c36006e5-9fbb-4f20-866b-0ece245615a7\",\n \"appointmentNumber\": \"1\",\n \"patientUuid\": \"2c33920f-7aa6-48d6-998a-60412d8ff7d5\",\n \"serviceUuid\": \"c36006d4-9fbb-4f20-866b-0ece245615c1\",\n \"serviceTypeUuid\": \"672546e5-9fbb-4f20-866b-0ece24564578\",\n \"startDateTime\": \"2017-07-20\",\n \"endDateTime\": \"2017-07-20\",\n \"comments\": \"Some notes\",\n \"appointmentKind\": \"WalkIn\"\n}",
  221. "options": {
  222. "raw": {
  223. "language": "json"
  224. }
  225. }
  226. },
  227. "url": {
  228. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointment",
  229. "protocol": "https",
  230. "host": [
  231. "dev3",
  232. "openmrs",
  233. "org"
  234. ],
  235. "path": [
  236. "openmrs",
  237. "ws",
  238. "rest",
  239. "v1",
  240. "appointment"
  241. ]
  242. }
  243. },
  244. "response": []
  245. },
  246. {
  247. "name": "Undo appointment status change, should return an error object",
  248. "request": {
  249. "method": "POST",
  250. "header": [],
  251. "body": {
  252. "mode": "raw",
  253. "raw": "{}",
  254. "options": {
  255. "raw": {
  256. "language": "json"
  257. }
  258. }
  259. },
  260. "url": {
  261. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointment/undoStatusChange/uuid",
  262. "protocol": "https",
  263. "host": [
  264. "dev3",
  265. "openmrs",
  266. "org"
  267. ],
  268. "path": [
  269. "openmrs",
  270. "ws",
  271. "rest",
  272. "v1",
  273. "appointment",
  274. "undoStatusChange",
  275. "uuid"
  276. ]
  277. }
  278. },
  279. "response": []
  280. },
  281. {
  282. "name": "Create appointment service",
  283. "request": {
  284. "method": "POST",
  285. "header": [],
  286. "body": {
  287. "mode": "raw",
  288. "raw": "{\n \"name\": \"Cardiology Consultation\",\n \"startTime\": \"09:00:00\",\n \"endTime\": \"17:30:00\",\n \"durationMins\": \"30\",\n \"locationUuid\": \"c36006e5-9fbb-4f20-866b-0ece245615a1\",\n \"specialityUuid\": \"c36006e5-9fbb-4f20-866b-0ece245615a1\",\n \"maxAppointmentsLimit\": \"30\",\n \"color\": \"#00ff00\"\n}",
  289. "options": {
  290. "raw": {
  291. "language": "json"
  292. }
  293. }
  294. },
  295. "url": {
  296. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointmentService",
  297. "protocol": "https",
  298. "host": [
  299. "dev3",
  300. "openmrs",
  301. "org"
  302. ],
  303. "path": [
  304. "openmrs",
  305. "ws",
  306. "rest",
  307. "v1",
  308. "appointmentService"
  309. ]
  310. }
  311. },
  312. "response": []
  313. },
  314. {
  315. "name": "Create appointment service with only name",
  316. "request": {
  317. "method": "POST",
  318. "header": [],
  319. "body": {
  320. "mode": "raw",
  321. "raw": "{\n \"name\": \"Sample Appointment Servie\"\n}",
  322. "options": {
  323. "raw": {
  324. "language": "json"
  325. }
  326. }
  327. },
  328. "url": {
  329. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointmentService",
  330. "protocol": "https",
  331. "host": [
  332. "dev3",
  333. "openmrs",
  334. "org"
  335. ],
  336. "path": [
  337. "openmrs",
  338. "ws",
  339. "rest",
  340. "v1",
  341. "appointmentService"
  342. ]
  343. }
  344. },
  345. "response": []
  346. },
  347. {
  348. "name": "Create appointment service with service availability",
  349. "request": {
  350. "method": "POST",
  351. "header": [],
  352. "body": {
  353. "mode": "raw",
  354. "raw": "{\n \"name\": \"Cardiology Consultation\",\n \"startTime\": \"09:00:00\",\n \"endTime\": \"17:30:00\",\n \"durationMins\": \"30\",\n \"locationUuid\": \"c36006e5-9fbb-4f20-866b-0ece245615a1\",\n \"specialityUuid\": \"c36006e5-9fbb-4f20-866b-0ece245615a1\",\n \"maxAppointmentsLimit\": \"30\",\n \"color\": \"#0000ff\",\n \"weeklyAvailability\": [\n {\n \"dayOfWeek\": \"MONDAY\",\n \"startTime\": \"09:00:00\",\n \"endTime\": \"17:30:00\",\n \"maxAppointmentsLimit\": \"10\"\n }\n ]\n}",
  355. "options": {
  356. "raw": {
  357. "language": "json"
  358. }
  359. }
  360. },
  361. "url": {
  362. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointmentService",
  363. "protocol": "https",
  364. "host": [
  365. "dev3",
  366. "openmrs",
  367. "org"
  368. ],
  369. "path": [
  370. "openmrs",
  371. "ws",
  372. "rest",
  373. "v1",
  374. "appointmentService"
  375. ]
  376. }
  377. },
  378. "response": []
  379. },
  380. {
  381. "name": "Create appointment with service type",
  382. "request": {
  383. "method": "POST",
  384. "header": [],
  385. "body": {
  386. "mode": "raw",
  387. "raw": "{\n \"name\": \"Cardiology Consultation\",\n \"startTime\": \"09:00:00\",\n \"endTime\": \"17:30:00\",\n \"durationMins\": \"30\",\n \"color\": \"#fff000\",\n \"locationUuid\": \"c36006e5-9fbb-4f20-866b-0ece245615a1\",\n \"specialityUuid\": \"c36006e5-9fbb-4f20-866b-0ece245615a1\",\n \"serviceTypes\": [\n {\n \"name\": \"type1\",\n \"duration\": \"20\"\n }\n ]\n}",
  388. "options": {
  389. "raw": {
  390. "language": "json"
  391. }
  392. }
  393. },
  394. "url": {
  395. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointmentService",
  396. "protocol": "https",
  397. "host": [
  398. "dev3",
  399. "openmrs",
  400. "org"
  401. ],
  402. "path": [
  403. "openmrs",
  404. "ws",
  405. "rest",
  406. "v1",
  407. "appointmentService"
  408. ]
  409. }
  410. },
  411. "response": []
  412. },
  413. {
  414. "name": "Create appointment with initial appointment status",
  415. "request": {
  416. "method": "POST",
  417. "header": [],
  418. "body": {
  419. "mode": "raw",
  420. "raw": "{\n \"name\": \"Cardiology Consultation\",\n \"initialAppointmentStatus\": \"Requested\"\n}",
  421. "options": {
  422. "raw": {
  423. "language": "json"
  424. }
  425. }
  426. },
  427. "url": {
  428. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointmentService",
  429. "protocol": "https",
  430. "host": [
  431. "dev3",
  432. "openmrs",
  433. "org"
  434. ],
  435. "path": [
  436. "openmrs",
  437. "ws",
  438. "rest",
  439. "v1",
  440. "appointmentService"
  441. ]
  442. }
  443. },
  444. "response": []
  445. },
  446. {
  447. "name": "Get all appointment services",
  448. "request": {
  449. "method": "GET",
  450. "header": [],
  451. "url": {
  452. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointmentService/all/default",
  453. "protocol": "https",
  454. "host": [
  455. "dev3",
  456. "openmrs",
  457. "org"
  458. ],
  459. "path": [
  460. "openmrs",
  461. "ws",
  462. "rest",
  463. "v1",
  464. "appointmentService",
  465. "all",
  466. "default"
  467. ]
  468. }
  469. },
  470. "response": []
  471. },
  472. {
  473. "name": "Get appointment service by uuid",
  474. "request": {
  475. "method": "GET",
  476. "header": [],
  477. "url": {
  478. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointmentService?uuid=some-uuid",
  479. "protocol": "https",
  480. "host": [
  481. "dev3",
  482. "openmrs",
  483. "org"
  484. ],
  485. "path": [
  486. "openmrs",
  487. "ws",
  488. "rest",
  489. "v1",
  490. "appointmentService"
  491. ],
  492. "query": [
  493. {
  494. "key": "uuid",
  495. "value": "some-uuid"
  496. }
  497. ]
  498. }
  499. },
  500. "response": []
  501. },
  502. {
  503. "name": "Delete appointment service by appointment servie uuid",
  504. "request": {
  505. "method": "DELETE",
  506. "header": [],
  507. "url": {
  508. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointmentService?uuid=some-delete-uuid",
  509. "protocol": "https",
  510. "host": [
  511. "dev3",
  512. "openmrs",
  513. "org"
  514. ],
  515. "path": [
  516. "openmrs",
  517. "ws",
  518. "rest",
  519. "v1",
  520. "appointmentService"
  521. ],
  522. "query": [
  523. {
  524. "key": "uuid",
  525. "value": "some-delete-uuid"
  526. }
  527. ]
  528. }
  529. },
  530. "response": []
  531. },
  532. {
  533. "name": "Update appointment service",
  534. "request": {
  535. "method": "POST",
  536. "header": [],
  537. "body": {
  538. "mode": "raw",
  539. "raw": "{\n \"name\": \"Chemotherapy\",\n \"startTime\": \"09:00:00\",\n \"endTime\": \"17:30:00\",\n \"durationMins\": \"30\",\n \"uuid\": \"uuid\",\n \"locationUuid\": \"c36006e5-9fbb-4f20-866b-0ece245615a1\",\n \"specialityUuid\": \"c36006e5-9fbb-4f20-866b-0ece245615a1\",\n \"serviceTypes\": [\n {\n \"name\": \"stage 1\",\n \"duration\": \"20\",\n \"uuid\": \"c36006d5-9fcc-4f20-866b-0ece245615b1\"\n }\n ]\n}",
  540. "options": {
  541. "raw": {
  542. "language": "json"
  543. }
  544. }
  545. },
  546. "url": {
  547. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointmentService",
  548. "protocol": "https",
  549. "host": [
  550. "dev3",
  551. "openmrs",
  552. "org"
  553. ],
  554. "path": [
  555. "openmrs",
  556. "ws",
  557. "rest",
  558. "v1",
  559. "appointmentService"
  560. ]
  561. }
  562. },
  563. "response": []
  564. },
  565. {
  566. "name": "Get load by serviceType for a dange range",
  567. "request": {
  568. "method": "GET",
  569. "header": [],
  570. "url": {
  571. "raw": "https://dev3.openmrs.org/openmrs/ws/rest/v1/appointmentService/load?uuid=99b2ea38-e041-41eb-9ed2-25a265068764&startDateTime=&endDateTime=",
  572. "protocol": "https",
  573. "host": [
  574. "dev3",
  575. "openmrs",
  576. "org"
  577. ],
  578. "path": [
  579. "openmrs",
  580. "ws",
  581. "rest",
  582. "v1",
  583. "appointmentService",
  584. "load"
  585. ],
  586. "query": [
  587. {
  588. "key": "uuid",
  589. "value": "99b2ea38-e041-41eb-9ed2-25a265068764"
  590. },
  591. {
  592. "key": "startDateTime",
  593. "value": ""
  594. },
  595. {
  596. "key": "endDateTime",
  597. "value": ""
  598. }
  599. ]
  600. }
  601. },
  602. "response": []
  603. },
  604. {
  605. "name": "Get all appointment by date and status",
  606. "request": {
  607. "method": "GET",
  608. "header": [],
  609. "url": {
  610. "raw": "http:///openmrs/rest/v1/appointmentStatus?forDate=2022-08-02&status=missed",
  611. "protocol": "http",
  612. "path": [
  613. "openmrs",
  614. "rest",
  615. "v1",
  616. "appointmentStatus"
  617. ],
  618. "query": [
  619. {
  620. "key": "forDate",
  621. "value": "2022-08-02"
  622. },
  623. {
  624. "key": "status",
  625. "value": "missed"
  626. }
  627. ]
  628. }
  629. },
  630. "response": []
  631. }
  632. ]
  633. }
Add Comment
Please, Sign In to add comment