-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequest-examples.http
110 lines (93 loc) · 2.65 KB
/
request-examples.http
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
@server = https://central.main.internal.tamanu.io
@token = {{login.response.body.token}}
### Login
# @name login
POST {{server}}/api/login
Content-Type: application/json
{
"email": "",
"password": "",
"deviceId": ""
}
### Retrieve first 100 patient records for sync
GET {{server}}/api/sync/patient?since=0&limit=100
Authorization: Bearer {{token}}
Accept: application/json
### Get all surveys
GET {{server}}/api/sync/survey?since=1614690000000;aaa HTTP/1.1
Content-Type: application/json
Authorization: Bearer {{token}}
[]
###
# update an existing survey screen component
POST {{server}}/api/sync/survey HTTP/1.1
Authorization: Bearer {{token}}
Content-Type: application/json
[
{
"recordType": "survey",
"data": {
"id": "program-referral_forms/survey-cvd_referral",
"programId": "program-hidden_forms"
}
},
{
"recordType": "survey",
"data": {
"id": "program-referral_forms/survey-bcp_referral",
"programId": "program-hidden_forms"
}
},
{
"recordType": "survey",
"data": {
"id": "program-referral_forms/survey-ccp_referral",
"programId": "program-hidden_forms"
}
}
]
###
# See: https://github.com/beyondessential/tamanu/blob/dev/docs/Surveys.md for more info.
# requires tamanu facility server to be running locally.
POST http://localhost:4000/api/admin/importSurvey
X-Client-Version: 1.0.0
Content-Type: application/json
{
"file": "/Users/basgo/Downloads/Breast.Cancer.Referral.xlsx",
"programName": "Referrals",
"programCode": "referral_forms",
"surveyName": "Breast Cancer Screening Referral",
"surveyCode": "bcpr_referral",
"surveyType": "referral",
"dryRun": false
}
###
# See: https://github.com/beyondessential/tamanu/blob/dev/docs/Surveys.md for more info.
# requires tamanu facility server to be running locally.
POST http://localhost:4000/api/admin/importSurvey
X-Client-Version: 1.0.0
Content-Type: application/json
{
"file": "/Users/basgo/Downloads/Cervical.Cancer.Referral.xlsx",
"programName": "Referrals",
"programCode": "referral_forms",
"surveyName": "Cervical Cancer Primary Referral",
"surveyCode": "ccpr_referral",
"surveyType": "referral",
"dryRun": false
}
###
# See: https://github.com/beyondessential/tamanu/blob/dev/docs/Surveys.md for more info.
# requires tamanu facility server to be running locally.
POST http://localhost:4000/api/admin/importSurvey
X-Client-Version: 1.0.0
Content-Type: application/json
{
"file": "/Users/basgo/Downloads/CVD.Referral.xlsx",
"programName": "Referrals",
"programCode": "referral_forms",
"surveyName": "CVD Primary Referral",
"surveyCode": "cvdpr_referral",
"surveyType": "referral",
"dryRun": false
}