2017-11-18 44 views
0

我無法檢索所有的字段,我發佈的ProcedureRequest到FHIR數據庫。FHIR:ProcedureRequest如何檢索ProcedureRequest的所有數據字段?

第1步:發佈採購信息發佈

{ 
    "resourceType":"OperationOutcome", 
    "text":{ 
     "status":"generated", 
     "div":"<div xmlns=\"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 &quot;ProcedureRequest/7660/_history/1&quot; in 7ms</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/7660/_history/1\" in 7ms" 
     } 
    ] 
} 

curl -X POST https://fhir.dstu2.safetylabs.org/api/smartdstu2/open/ProcedureRequest \ 
     -H 'Content-type: application/json+fhir' \ 
     --data @ProcedureRequest.js 

結果這個請求是成功的。

的JSON從JSON驗證器驗證,還從HAPI測試服務器驗證從給定鏈路

" https://fhirtest.uhn.ca/resource?serverId=home_21&pretty=false&resource=ProcedureRequest" 

步驟2:檢索請求

curl -X GET https://fhir.dstu2.safetylabs.org/api/smartdstu2/open/ProcedureRequest/7660 

結果GET

{ 
    "resourceType":"ProcedureRequest", 
    "id":"7660", 
    "meta":{ 
     "versionId":"1", 
     "lastUpdated":"2017-11-18T13:49:23.000+00:00" 
    }, 
    "text":{ 
     "status":"generated", 
     "div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: subrequest</p><p><b>definition</b>: Protocol for alergies</p><p><b>basedOn</b>: Original Request</p><p><b>replaces</b>: Previous allergy test</p><p><b>requisition</b>: A13848392</p><p><b>status</b>: active</p><p><b>intent</b>: instance-order</p><p><b>priority</b>: routine</p><p><b>code</b>: Peanut IgG <span>(Details : {LOINC code '35542-0' = 'Peanut IgG Ab [Mass/volume] in Serum)</span></p><p><b>subject</b>: <a>Patient/dicom</a></p><p><b>occurrence</b>: 08/05/2013 9:33:27 AM</p><h3>Requesters</h3><table><tr><td>-</td><td><b>Agent</b></td></tr><tr><td>*</td><td><a>Dr. Adam Careful</a></td></tr></table><p><b>performerType</b>: Nurse <span>(Details : {[not stated] code 'null' = 'null', given as 'Qualified nurse'})</span></p><p><b>reasonCode</b>: Check for Peanut Allergy <span>(Details)</span></p><p><b>bodySite</b>: Right arm <span>(Details : {[not stated] code 'null' = 'null', given as 'Right arm'})</span></p></div>" 
    }, 
    "subject":{ 
     "reference":"Patient/SL88812358" 
    }, 
    "code":{ 
     "coding":[ 
      { 
       "system":"http://loinc.org", 
       "code":"35542-0" 
      } 
     ], 
     "text":"Peanut IgG" 
    }, 
    "bodySite":[ 
     { 
      "coding":[ 
       { 
        "display":"Right arm" 
       } 
      ], 
      "text":"Right arm" 
     } 
    ], 
    "status":"active", 
    "priority":"routine" 
} 

需要注意的是檢索未檢索到以下字段

  • occurrenceTiming
  • occurrenceDateTime
  • performerType
  • reasonCode
  • 請求者

問:我如何請求我發佈的所有字段?

回答

0

那是因爲你張貼到DSTU2服務器和這些元素不存在DSTU2 - 使服務器忽略它們(如服務器被允許與未知的元素做)。如果您發佈到DSTU3服務器,則應該存儲這些元素 - 如果服務器支持它們,那麼大多數測試服務器都會這樣做。