-
Notifications
You must be signed in to change notification settings - Fork 0
/
ffc-api-happy-path.postman_collection.json
9236 lines (9236 loc) · 769 KB
/
ffc-api-happy-path.postman_collection.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"info": {
"_postman_id": "579c932f-3111-4943-8d99-750bf4f643d1",
"name": "ffc-api-happy-path",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Lookup",
"item": [
{
"name": "List homehealth",
"event": [
{
"listen": "test",
"script": {
"id": "810c6cab-30ee-4524-b4e7-561363dbe4b7",
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{url}}/homehealth",
"host": [
"{{url}}"
],
"path": [
"homehealth"
]
},
"description": "แสดงรายการประเภทการเยี่ยมทั้งหมด"
},
"response": []
},
{
"name": "Get homehealth by type id",
"event": [
{
"listen": "test",
"script": {
"id": "20034976-d757-4545-a018-5a2f38942c0d",
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Response have translation\", function () {",
" pm.expect(pm.response.text()).to.include(\"1106\");",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{url}}/homehealth/1A01106",
"host": [
"{{url}}"
],
"path": [
"homehealth",
"1A01106"
]
},
"description": "ขอข้อมูลประเภทการเยี่ยม 1 รายการโดยใช้ id"
},
"response": []
},
{
"name": "Get homehealth query by id",
"event": [
{
"listen": "test",
"script": {
"id": "20034976-d757-4545-a018-5a2f38942c0d",
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Response have translation\", function () {",
" pm.expect(pm.response.text()).to.include(\"1106\");",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{url}}/homehealth?query=1106",
"host": [
"{{url}}"
],
"path": [
"homehealth"
],
"query": [
{
"key": "query",
"value": "1106",
"description": "ขอรายการเยี่ยมที่ id ตรงกับ 1106"
}
]
},
"description": "ขอรายการประเภทการเยี่ยมตาม id ที่ต้องการ"
},
"response": []
},
{
"name": "List disease",
"event": [
{
"listen": "test",
"script": {
"id": "bf2ead31-71a5-416c-b30c-3711230aa967",
"type": "text/javascript",
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});"
]
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Accept-Language",
"value": "th"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{url}}/disease",
"host": [
"{{url}}"
],
"path": [
"disease"
]
},
"description": "แสดงรายการโรคทั้งหมดมี limit 100 รายการ"
},
"response": []
},
{
"name": "Get 1 disease by type id",
"event": [
{
"listen": "test",
"script": {
"id": "bf2ead31-71a5-416c-b30c-3711230aa967",
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Accept-Language",
"value": "th"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{url}}/disease/icd10/A00",
"host": [
"{{url}}"
],
"path": [
"disease",
"icd10",
"A00"
]
},
"description": "ขอข้อมูลรายการโรค 1 รายการ"
},
"response": []
},
{
"name": "Get 1 disease by name",
"event": [
{
"listen": "test",
"script": {
"id": "20a93047-e1aa-4612-8dba-5e07e0560d9b",
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Response have Paratyphoid fever C\", function () {",
" pm.expect(pm.response.text()).to.include(\"Paratyphoid fever C\");",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Accept-Language",
"value": "th"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{url}}/disease?query=fever C&delay=500",
"host": [
"{{url}}"
],
"path": [
"disease"
],
"query": [
{
"key": "query",
"value": "fever C"
},
{
"key": "delay",
"value": "500"
}
]
},
"description": "ขอรายการชื่อโรค 1 รายการ ด้วยชื่อภาษาอังกฤษ"
},
"response": []
}
]
},
{
"name": "Prerequisite",
"item": [
{
"name": "Register Organization",
"event": [
{
"listen": "test",
"script": {
"id": "b89d75d2-428e-4efe-a698-12d8b8cf8a06",
"exec": [
"pm.test(\"Status code is 201\", function () {",
" pm.response.to.have.status(201);",
"});",
"",
"pm.test(\"Response have id\", function () {",
" pm.expect(pm.response.text()).to.include(\"id\");",
" ",
" //set token to global variable for later use",
" var orgRes = pm.response.json();",
" pm.globals.set(\"org_id\", orgRes.id);",
"});",
"",
"pm.test(\"Response have pcucode\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.link.keys.pcucode).to.eql('10008');",
"});",
"",
"pm.test(\"Response have new id from POST\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.id).to.not.eql(\"1459f3933d5e4ef8b0a68463c012f26b\");",
"});",
"",
"pm.test(\"Response have new id of role:USER\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.id).to.not.eql(\"bdb8c14b3feb47dba0311cf6dd8233a6\");",
"});",
"",
"pm.test(\"Response have new id of role:ORG\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.id).to.not.eql(\"5dc194a5b85b4733889247578e4bd5f0\");",
"});",
"",
"pm.test(\"Response have timestamp from POST\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(pm.response.text()).to.include(\"2018-06-28T17:17:43.645+07:00\");",
" pm.expect(jsonData.timestamp).to.eql(\"2018-06-28T17:17:43.645+07:00\");",
"});",
"",
"pm.test(\"Response have timestamp of role:PROVIDER from POST\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.users[0].timestamp).to.eql(\"2018-06-28T14:14:43.645+07:00\");",
"});",
"",
"pm.test(\"Response have link lastSync \", function () {",
" var jsonData = pm.response.json();",
" pm.expect(pm.response.text()).to.include(\"2018-06-28\");",
" pm.expect(jsonData.link.lastSync).to.eql(\"2018-06-28T17:21:29.645+07:00\");",
"});",
"",
"",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"รพสต-พิรุณ\",\n \"displayName\": \"รพ.สต. พิรุณ\",\n \"users\": [\n {\n \"name\": \"puy\",\n \"password\": \"hipuy\",\n \"roles\": [\"PROVIDER\"],\n \"id\": \"bdb8c14b3feb47dba0311cf6dd8233a6\",\n \"type\": \"User\",\n \"timestamp\": \"2018-06-28T14:14:43.645+07:00\"\n },\n {\n \"name\": \"pcu100214.airsync\",\n \"password\": \"a1e6-4f63e8295160\",\n \"roles\": [\"ADMIN\",\"SYNC_AGENT\"],\n \"id\": \"5dc194a5b85b4733889247578e4bd5f0\",\n \"type\": \"User\",\n \"timestamp\": \"2018-06-28T14:19:29.645+07:00\"\n }\n ],\n \"link\": {\n \"isSynced\": true,\n \"lastSync\": \"2018-06-28T17:21:29.645+07:00\",\n \"system\": \"JHICS\",\n \"keys\": {\n \"pcucode\": \"10008\"\n }\n },\n \"id\": \"1459f3933d5e4ef8b0a68463c012f26b\",\n \"type\": \"Organization\",\n \"timestamp\": \"2018-06-28T17:17:43.645+07:00\"\n}"
},
"url": {
"raw": "{{url}}/org",
"host": [
"{{url}}"
],
"path": [
"org"
]
},
"description": "ลงทะเบียนหน่วยงานสำเร็จ"
},
"response": [
{
"name": "Register Org",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"pcuCode\":\"145\",\n \"name\": \"เนคเทค\",\n \"uuid\": \"151b9\"\n}"
},
"url": {
"raw": "{{url}}/org",
"host": [
"{{url}}"
],
"path": [
"org"
]
}
},
"status": "Created",
"code": 201,
"_postman_previewlanguage": "json",
"header": [],
"cookie": [],
"body": "{\n \"code\": \"145\",\n \"name\": \"เนคเทค\",\n \"uuid\": \"15169\",\n \"token\": \"2314abc\",\n \"id\": \"1\"\n}"
}
]
},
{
"name": "Organization Login",
"event": [
{
"listen": "test",
"script": {
"id": "27330a9b-cc67-4964-81b5-f4aa40a31f98",
"exec": [
"pm.test(\"Status code is 201\", function () {",
" pm.response.to.have.status(201);",
"});",
"",
"pm.test(\"Response have token\", function () {",
" pm.expect(pm.response.text()).to.include(\"token\");",
" ",
" //set token to global variable for later use",
" var orgRes = pm.response.json();",
" pm.globals.set(\"org_token\", orgRes.token);",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"username\": \"pcu100214.airsync\",\n \"password\": \"a1e6-4f63e8295160\"\n}"
},
"url": {
"raw": "{{url}}/org/{{org_id}}/authorize",
"host": [
"{{url}}"
],
"path": [
"org",
"{{org_id}}",
"authorize"
]
},
"description": "หน่วยงานเข้าสู่ระบบได้สำเร็จ"
},
"response": [
{
"name": "Login not success",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Basic YWRtaW4wOjEyMzQ=",
"warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman."
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{url}}/org/{{org_id}}/authorize",
"host": [
"{{url}}"
],
"path": [
"org",
"{{org_id}}",
"authorize"
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "Text",
"header": [],
"cookie": [],
"body": ""
},
{
"name": "Login success",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"warning": ""
},
{
"key": "Authorization",
"value": "Basic YWRtaW4wOjEyMzRhZG1pbjA=",
"warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman."
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{url}}/org/15169/authorize",
"host": [
"{{url}}"
],
"path": [
"org",
"15169",
"authorize"
]
}
},
"status": "Created",
"code": 201,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Access-Control-Allow-Credentials",
"value": "",
"name": "Access-Control-Allow-Credentials",
"description": "Indicates whether or not the response to the request can be exposed when the credentials flag is true. When used as part of a response to a preflight request, this indicates whether or not the actual request can be made using credentials."
},
{
"key": "Access-Control-Allow-Headers",
"value": "",
"name": "Access-Control-Allow-Headers",
"description": "Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."
},
{
"key": "Access-Control-Allow-Methods",
"value": "",
"name": "Access-Control-Allow-Methods",
"description": "Specifies the method or methods allowed when accessing the resource. This is used in response to a preflight request."
},
{
"key": "Access-Control-Allow-Origin",
"value": "*",
"name": "Access-Control-Allow-Origin",
"description": "Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource."
},
{
"key": "Access-Control-Expose-Headers",
"value": "",
"name": "Access-Control-Expose-Headers",
"description": "Lets a server whitelist headers that browsers are allowed to access."
},
{
"key": "Connection",
"value": "keep-alive",
"name": "Connection",
"description": "Options that are desired for the connection"
},
{
"key": "Content-Encoding",
"value": "gzip",
"name": "Content-Encoding",
"description": "The type of encoding used on the data."
},
{
"key": "Content-Length",
"value": "162",
"name": "Content-Length",
"description": "The length of the response body in octets (8-bit bytes)"
},
{
"key": "Content-Type",
"value": "application/json; charset=utf-8",
"name": "Content-Type",
"description": "The mime type of this content"
},
{
"key": "Date",
"value": "Tue, 20 Mar 2018 04:18:00 GMT",
"name": "Date",
"description": "The date and time that the message was sent"
},
{
"key": "ETag",
"value": "W/\"b6-oUGEoKt9RUUxcv8TyyY7wA\"",
"name": "ETag",
"description": "An identifier for a specific version of a resource, often a message digest"
},
{
"key": "Server",
"value": "nginx",
"name": "Server",
"description": "A name for the server"
},
{
"key": "Vary",
"value": "Accept-Encoding",
"name": "Vary",
"description": "Tells downstream proxies how to match future request headers to decide whether the cached response can be used rather than requesting a fresh one from the origin server."
}
],
"cookie": [],
"body": "{\n\t\"token\": \"123abcdef\"\n}"
}
]
},
{
"name": "Register User",
"event": [
{
"listen": "test",
"script": {
"id": "4e552b2c-0a24-442c-aa2a-fbc9931bf663",
"exec": [
"pm.test(\"Status code is 201\", function () {",
" pm.response.to.have.status(201);",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "oauth2",
"oauth2": [
{
"key": "accessToken",
"value": "{{org_token}}",
"type": "string"
},
{
"key": "addTokenTo",
"value": "header",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "[\n {\n \"name\": \"blast\",\n \"password\": \"theblast\",\n \"roles\": [\"PROVIDER\"],\n \"id\": \"1238c14b3feb47dba0311cf6dd8233a6\",\n \"type\": \"User\",\n \"timestamp\": \"2018-06-28T14:14:43.645+07:00\"\n },\n {\n \"name\": \"max\",\n \"password\": \"maxmax\",\n \"roles\": [\"PROVIDER\"],\n \"id\": \"456194a5b85b4733889247578e4bd5f0\",\n \"type\": \"User\",\n \"timestamp\": \"2018-06-28T14:19:29.645+07:00\"\n },\n {\n \"name\": \"Yuzu\",\n \"password\": \"Yuzu\",\n \"roles\": [\"PROVIDER\"],\n \"id\": \"789194a5b85b4733889247578e4bd5f0\",\n \"type\": \"User\",\n \"timestamp\": \"2018-06-28T14:30:29.645+07:00\"\n }\n]"
},
"url": {
"raw": "{{url}}/org/{{org_id}}/user",
"host": [
"{{url}}"
],
"path": [
"org",
"{{org_id}}",
"user"
]
},
"description": "ลงทะเบียนผู้ใช้งานสำเร็จ"
},
"response": [
{
"name": "Register User",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "[{\n \"username\":\"admin0\",\n \"password\": \"1234admin0\"\n},{\n\t\"username\":\"admin1\",\n \"password\": \"1234admin1\"\n}\n]"
},
"url": {
"raw": "{{url}}/org/1/user",
"host": [
"{{url}}"
],
"path": [
"org",
"1",
"user"
]
}
},
"status": "Created",
"code": 201,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Access-Control-Allow-Credentials",
"value": "",
"name": "Access-Control-Allow-Credentials",
"description": "Indicates whether or not the response to the request can be exposed when the credentials flag is true. When used as part of a response to a preflight request, this indicates whether or not the actual request can be made using credentials."
},
{
"key": "Access-Control-Allow-Headers",
"value": "",
"name": "Access-Control-Allow-Headers",
"description": "Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."
},
{
"key": "Access-Control-Allow-Methods",
"value": "",
"name": "Access-Control-Allow-Methods",
"description": "Specifies the method or methods allowed when accessing the resource. This is used in response to a preflight request."
},
{
"key": "Access-Control-Allow-Origin",
"value": "*",
"name": "Access-Control-Allow-Origin",
"description": "Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource."
},
{
"key": "Access-Control-Expose-Headers",
"value": "",
"name": "Access-Control-Expose-Headers",
"description": "Lets a server whitelist headers that browsers are allowed to access."
},
{
"key": "Connection",
"value": "keep-alive",
"name": "Connection",
"description": "Options that are desired for the connection"
},
{
"key": "Content-Encoding",
"value": "gzip",
"name": "Content-Encoding",
"description": "The type of encoding used on the data."
},
{
"key": "Content-Length",
"value": "159",
"name": "Content-Length",
"description": "The length of the response body in octets (8-bit bytes)"
},
{
"key": "Content-Type",
"value": "application/json; charset=utf-8",
"name": "Content-Type",
"description": "The mime type of this content"
},
{
"key": "Date",
"value": "Mon, 19 Mar 2018 10:01:07 GMT",
"name": "Date",
"description": "The date and time that the message was sent"
},
{
"key": "ETag",
"value": "W/\"b1-t6MXwpDE+IBswaWGyMe2Qg\"",
"name": "ETag",
"description": "An identifier for a specific version of a resource, often a message digest"
},
{
"key": "Server",
"value": "nginx",
"name": "Server",
"description": "A name for the server"
},
{
"key": "Vary",
"value": "Accept-Encoding",
"name": "Vary",
"description": "Tells downstream proxies how to match future request headers to decide whether the cached response can be used rather than requesting a fresh one from the origin server."
}
],
"cookie": [],
"body": ""
}
]
},
{
"name": "Create Suggestion health care service",
"event": [
{
"listen": "test",
"script": {
"id": "b94c3173-f360-4aea-8feb-103cf2ab1200",
"exec": [
"pm.test(\"Status code is 201\", function () {",
" pm.response.to.have.status(201);",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "oauth2",
"oauth2": [
{
"key": "accessToken",
"value": "{{org_token}}",
"type": "string"
},
{
"key": "addTokenTo",
"value": "header",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "[\n {\n \"value\": \"แนะนำเรื่องการรับประทานยาอย่างต่อเนื่อง และไปพบแพทย์ตามนัด\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"ระวังการเกิดอุบัติเหตุ การรับประทานยาและการควบคุมอาหาร\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"มารดามีความรู้และจะพาบุตรไปฉีดวัคซีน DTP+HB 1 อายุ 2 เดือน และตรวจพัฒนาการ\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"แนะนำญาติดูแลสายสวนปัสสาวะไม่ให้บิดงอ\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"แนะนำการทำกายภาพบำบัดแก่ญาติผู้ป่วย\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"เยี่ยมอาทิตย์ละ 1 ครั้ง\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"เยี่ยมปีละ 1 ครั้ง\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"เยี่ยมทุกเดือน\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"เยี่ยมทุกวัน วัดความดื้อ ทุกครั้งที่ไปเยี่ยม\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"เยี่ยมทุก 3 เดือน\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"สามารถดูแลตนเองได้เป็นอย่างดี\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"ผู้ป่วยช่วยเหลือตัวเองเลี้ยงลูกด้วยนมแม่ได้อย่างถูกต้อง ตอบคำถาม ดูดเร็ว ดูดบ่อย ดูดถูกวิธี\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"ลดอาหารจำพวกแป้ง ขนมหวาน\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"แนะนำเรื่องการออกกำลังกายอย่างสม่ำเสมอเกี่ยวกับโรคที่ตนเองเป็นอยู่\",\n \"field\": \"HomeVisit.detail\"\n },\n {\n \"value\": \"มารดาสามารถดูแลบุตรได้เเป็นอย่างดี\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"แนะนำเรื่องการรับประทานอาหารให้เหมาะสมกับโรคที่เป็นอยู่\",\n \"field\": \"HomeVisit.detail\"\n },\n {\n \"value\": \"ผู้ป่วยสามารถทำตามคำแนะนำได้เป็นอย่างดี\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"ป้องกันการเกิดแผลกดทับ และอาการแทรกซ้อน\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"ป้องกันการเกิดภาวะเเทรกซ้อน\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"นัดเยี่ยมหลังคลอดและตรวจหลังคลอด 6สัปดาห์\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"นัดตรวจภายในหลังคลอดบุตร\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"ต้องการญาติดูแลผู้ป่วยใกล้ชิด\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"ญาติสามารถดูแลผู้สูงอายุได้ดี\",\n \"field\": \"HomeVisit.result\"\n },\n {\n \"value\": \"ใส่สายสวนปัสสาวะ และใส่สายอาหารแก่ผู้ป่วย\",\n \"field\": \"HomeVisit.detail\"\n },\n {\n \"value\": \"แพทย์แผนไทยนวดผ่อนคลายความเครียด\",\n \"field\": \"HomeVisit.detail\"\n },\n {\n \"value\": \"แนะนำเรื่องการรับประทานยาและไปรับการรักษาอย่างต่อเนื่อง\",\n \"field\": \"HomeVisit.detail\"\n },\n {\n \"value\": \"แนะนำเรื่องการรับประทานยาเกี่ยวกับโรค และไปรับการรักษาอย่างต่อเนื่อง\",\n \"field\": \"HomeVisit.detail\"\n },\n {\n \"value\": \"แนะนำเรื่องการดูแลให้นมบุตร\",\n \"field\": \"HomeVisit.detail\"\n },\n {\n \"value\": \"แนะนำเรื่องการทานอาหารและการออกกำลังกายให้เหมาะสมกับวัย\",\n \"field\": \"HomeVisit.detail\"\n },\n {\n \"value\": \"แนะนำกระตุ้นพัฒนาการเด็กให้เหมาะสมกับวัย\",\n \"field\": \"HomeVisit.detail\"\n },\n {\n \"value\": \"อาการอื่นๆทั่วไปปกติ\",\n \"field\": \"HomeVisit.detail\"\n },\n {\n \"value\": \"ประเมินภาวะซึมเศร้า โดยนักจิตวิทยา = ไม่มีภาวะซึมเศร้า\",\n \"field\": \"HomeVisit.detail\"\n },\n {\n \"value\": \"แนะนำเรื่องการทานอาหารและการออกกำลังกายเพื่อเพิ่มสมรรถภาพ ...\",\n \"field\": \"HomeVisit.detail\"\n },\n {\n \"value\": \"ทำกายภาพบำบัดแก่ผู้ป่วยโดยนักกายภาพบำบัด\",\n \"field\": \"HomeVisit.detail\"\n },\n {\n \"value\": \"จ่ายยาแก้เหงา เส้าสร้อย Soka ardoon\",\n \"field\": \"HomeVisit.detail\"\n },\n {\n \"value\": \"แผลฝีเย็บแห้งดี\",\n \"field\": \"HealthCareService.syntom\"\n },\n {\n \"value\": \"เยี่ยมผู้สูงอายุประจำปี\",\n \"field\": \"HealthCareService.syntom\"\n },\n {\n \"value\": \"เปลี่ยนสายอาหารและสายปัสสาวะให้แก่ผู้ป่วย\",\n \"field\": \"HealthCareService.syntom\"\n },\n {\n \"value\": \"อาการทั่วไปปกติดี ผู้ป่วยสามารถดูแลตนเองได้\",\n \"field\": \"HealthCareService.syntom\"\n },\n {\n \"value\": \"อาการทั่วไปปกติ\",\n \"field\": \"HealthCareService.syntom\"\n },\n {\n \"value\": \"สุขภาพแข็งแรงสมบูรณ์มาก\",\n \"field\": \"HealthCareService.syntom\"\n },\n {\n \"value\": \"รู้สึกตัว\",\n \"field\": \"HealthCareService.syntom\"\n },\n {\n \"value\": \"ผู้ป่วยสามารถช่วยเหลือตนเองได้ดี\",\n \"field\": \"HealthCareService.syntom\"\n },\n {\n \"value\": \"วัดความดัน และแนะนำในการดูแลสุขภาพให้เหมาะกับโรคประจำตัว\",\n \"field\": \"HomeVisit.detail\"\n },\n {\n \"value\": \"ผู้ป่วยช่วยเหลือตัวเองได้น้อย\",\n \"field\": \"HealthCareService.syntom\"\n },\n {\n \"value\": \"ผู้ป่วยช่วยเหลือตนเองไม่ได้\",\n \"field\": \"HealthCareService.syntom\"\n },\n {\n \"value\": \"ติดตามเรื่องระดับความดันโลหิตของผู้ป่วย 159/79 mmHg\",\n \"field\": \"HealthCareService.syntom\"\n },\n {\n \"value\": \"ผู้ป่วยสามารถเลี้ยงบุตรด้วยนมแม่ได้อย่างถูกต้องสามารถตอบคำถามได้อย่างถูกต้องเรื่องการรับประทานอาหารที่มีประโยชน์\",\n \"field\": \"HealthCareService.syntom\"\n },\n {\n \"value\": \"บุตรดูดนมได้ลูกต้อง ดูดเร็ว ดูดบ่อย ดูดถูกวิธี แข็งแรงสมบูรณ์\",\n \"field\": \"HealthCareService.syntom\"\n },\n {\n \"value\": \"ติดตามผู้ป่วยเบาหวานที่มีระดับน้ำตาลในเลือดสูงเกิน 200 mg% (DTX= mg%)\",\n \"field\": \"HealthCareService.syntom\"\n }\n]"
},
"url": {
"raw": "{{url}}/org/{{org_id}}/template/",
"host": [
"{{url}}"
],
"path": [
"org",
"{{org_id}}",
"template",
""
]
},
"description": "สร้างคำแนะนำสภาพ/อาการ ของผู้ป่วย การให้บริการ การประเมินผล"
},
"response": []
}
]
},
{
"name": "Login",
"item": [
{
"name": "Mobile Login No Activate",
"event": [
{
"listen": "test",
"script": {
"id": "dcdf9ce2-52de-4a8e-8341-0499a949911d",
"exec": [
"pm.test(\"Status code is 403\", function () {",
" pm.response.to.have.status(403);",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"username\": \"puy\",\n \"password\": \"hipuy\"\n}"
},
"url": {
"raw": "{{url}}/org/{{org_id}}/authorize",
"host": [
"{{url}}"
],
"path": [
"org",
"{{org_id}}",
"authorize"
]
},
"description": "Login ได้สำเร็จ"
},
"response": [
{
"name": "Puy Hipuy Login",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{url}}/org/{{org_id}}/authorize",
"host": [
"{{url}}"
],
"path": [
"org",
"{{org_id}}",
"authorize"
]
}
},
"status": "Created",
"code": 201,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Connection",
"value": "keep-alive",
"name": "Connection",
"description": "Options that are desired for the connection"
},
{
"key": "Content-Length",
"value": "478",
"name": "Content-Length",
"description": "The length of the response body in octets (8-bit bytes)"
},
{
"key": "Content-Type",
"value": "application/json",
"name": "Content-Type",
"description": "The mime type of this content"
},
{
"key": "Date",
"value": "Thu, 27 Sep 2018 09:34:45 GMT",
"name": "Date",
"description": "The date and time that the message was sent"
},
{
"key": "Server",
"value": "Jetty(9.4.z-SNAPSHOT)",
"name": "Server",
"description": "A name for the server"
},
{
"key": "Via",
"value": "1.1 vegur",
"name": "Via",
"description": "Informs the client of proxies through which the response was sent."
}
],
"cookie": [],
"body": "{\"role\":\"USER\",\"name\":\"\",\"timestamp\":\"2018-09-27T16:34:45.927+07:00\",\"createDate\":\"2018-09-27T16:34:45.927+07:00\",\"expireDate\":\"2018-09-28T16:34:45.927+07:00\",\"user\":{\"name\":\"puy\",\"role\":\"USER\",\"roles\":[\"USER\"],\"link\":{\"isSynced\":true,\"lastSync\":\"2018-09-27T15:40:24.984+07:00\",\"system\":\"JHICS\",\"keys\":{\"username\":\"puy\",\"pcucode\":\"01088\"}},\"id\":\"5bac977cdb9df90004cf25d3\",\"type\":\"User\",\"timestamp\":\"2018-09-27T15:40:24.984+07:00\",\"bundle\":{}},\"token\":\"5baca435db9df90004cfcdef\"}"
},
{
"name": "Login success",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"warning": ""
},
{
"key": "Authorization",
"value": "Basic YWRtaW4wOjEyMzRhZG1pbjA=",
"warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman."
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{url}}/org/15169/authorize",
"host": [
"{{url}}"
],
"path": [
"org",
"15169",
"authorize"
]
}
},
"status": "Created",