これはjsonファイルです:「ValidProcedureRequest.json」
{
"resourceType": "ProcedureRequest",
"text": {
"status": "generated",
"div": ""
},
"occurrenceTming" : {
"resourceType" : "Timing",
"event" : ["31-01-2017"],
"repeat" : {
"boundsPeriod" : { "start" : "10:55"},
"period" : 1,
"periodUnit" : "d",
"dayOfWeek" : ["mon,wed"],
"timeOfDay" : ["11::44"]
}
},
"occurrencePeriod" : {
"start" : "10:55",
"end" : "22:25"
},
"requester": {
"agent": {
"reference": "Practitioner/example"
}
},
"intent": "order",
"performer": {
"reference": "Practitioner/COREPRACTITIONER1"
},
"category": [
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "103693007",
"display": "Diagnostic procedure (procedure)"
}
],
"text": "Diagnostics Procedure"
}
],
"code": {
"coding": [
{
"system": "",
"code": "303653007",
"display": "Computed tomography of head"
}
]
},
"subject": {
"reference": "Patient/SL88812358"
}
}
ValidProcedureRequest.json ファイルに対して CURL コマンドを実行します。
"curl -X POST https://fhir.dstu2.safetylabs.org/api/smartdstu2/open/ProcedureRequest -H 'Content-type: application/json+fhir' --data ValidProcedureRequest.json
{
"resourceType":"OperationOutcome",
"text":{
"status":"generated",
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\ <http://www.w3.org/1999/xhtml/> "><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">information</td><td>[]</td><td><pre>Successfully created resource "ProcedureRequest/7549/_history/1" in 16ms</pre></td>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue":[
{
"severity":"information",
"code":"informational",
"diagnostics":"Successfully created resource \"ProcedureRequest/7549/_history/1\" in 16ms"
}
]"
注: 作成が成功したことを示します。FHIR データベースですべてのキーが更新されたことを意味します。
更新されたオブジェクトを取得するために curl コマンドを実行します。
curl -X GET https://fhir.dstu2.safetylabs.org/api/smartdstu2/open/ProcedureRequest/7549
{
"resourceType":"ProcedureRequest",
"id":"7549",
"meta":{
"versionId":"1",
"lastUpdated":"2017-11-03T13:06:50.000+00:00"
},
"text":{
"status":"generated"
},
"subject":{
"reference":"Patient/SL88812358"
},
"code":{
"coding":[
{
"code":"303653007",
"display":"Computed tomography of head"
}
]
},
"performer":{
"reference":"Practitioner/COREPRACTITIONER1"
}
質問 : GET リクエストで送信されたすべてのキー/値を取得するにはどうすればよいですか?