2017-01-04 22 views
0

我正在尋找捲髮請求示例,以便在FHIR(hir-open-api-dstu2.smarthealthit.org)數據庫上撰寫關於智能的Vitals信息。在FHIR上撰寫關於智能的重要信息

以下是我已經閱讀患者統計的http://docs.smarthealthit.org/tutorials/server-quick-start/

例發現:

捲曲 'https://fhir-open-api-dstu2.smarthealthit.org/Patient/1482713' -H '接受:應用/ JSON的'

實例檢索生命體徵:

curl'https://fhir-open-api-dstu2.smarthealthit.org/Observation?subject%3APatient=1482713&code=3141-9%2C8302-2%2C8287-5%2C39156-5&_count=50'-H'Accept:application/json'

PatientI d = 1482713和LOINC代碼:3141-9,8302-2,8287-5,39156-5(生命體徵)

怎麼寫 - 這當然是可能的概括這裏:

https://fhirblog.com/2015/03/06/smart-writing/

https://fhirblog.com/2016/03/23/smart-scopes-and-profiles/

的捲曲請求寫生命體徵是這樣的(不工作爲例):

捲曲「https://fhir-open-api-dstu2.smarthealthit.org/Observation.write?subject%3APatient=1482713&code=3141-9=10&_count=50」 -H「接受:應用/ JSON」

感謝您的幫助!

+0

Josh的完整的例子可以在這裏找到:https://groups.google.com/forum/#!topic/smart-on-fhir/I9xwM8aEdM4 –

回答

1

寫的,你需要使用:

curl \ 
    -X POST \ 
    https://fhir-open-api-dstu2.smarthealthit.org/Observation \ 
    -H 'Content-type: application/json+fhir' \ 
    -H 'Accept: application/json+fhir' \ 
    --data '{"resourceType": "Observation"}' 

,當然還有,你應該提供關於你的數據載荷觀察更多的細節:-)

+0

請給一些澄清未提供1)病人ID - DO我們爲PatientID 1482713添加主題%3APatient = 1482713? 2)是resourceType是LOINC代碼(例如收縮壓8480-6和舒張壓BP3 8462-4)是否觀察發送的值?當我們檢索時,我們提供LOINC代碼作爲輸入 - 代碼= - 這似乎從寫入中丟失。 –

0

這是基於對約什 - M的答覆:

curl -X POST \ 
    https://fhir-open-api-dstu2.smarthealthit.org/Observation \ 
    -H 'Content-type: application/json+fhir' \ 
    -H 'Accept: application/json+fhir' \ 
    --data @payload.json 

更明確有​​效載荷文件,有效日期,血壓和它的兩個分量: --payload.json文件---

{ 
    "resourceType": "Observation", 
    "status": "final", 
    "subject": { 
    "reference": "Patient/1951076" 
    }, 
    "category": { 
    "coding": [ 
     { 
     "system": "http://hl7.org/fhir/observation-category", 
     "code": "vital-signs", 
     "display": "Vital Signs" 
     } 
    ], 
    "text": "Vital Signs" 
    }, 
    "code": { 
    "coding": [ 
     { 
     "system": "http://loinc.org", 
     "code": "55284-4", 
     "display": "SBlood pressure systolic and diastolic" 
     } 
    ], 
    "text": "Blood pressure systolic and diastolic" 
    }, 
     "encounter": { 
      "reference": "Encounter/787" 
     }, 
     "effectiveDateTime": "2016-08-17", 
     "component": [ 
      { 
       "code": { 
        "coding": [ 
         { 
          "system": "http://loinc.org", 
          "code": "8480-6", 
          "display": "Systolic blood pressure" 
         } 
        ], 
        "text": "Systolic blood pressure" 
       }, 
       "valueQuantity": { 
        "value": 125, 
        "unit": "mmHg", 
        "system": "http://unitsofmeasure.org", 
        "code": "mm[Hg]" 
       } 
      }, 
      { 
       "code": { 
        "coding": [ 
         { 
          "system": "http://loinc.org", 
          "code": "8462-4", 
          "display": "Diastolic blood pressure" 
         } 
        ], 
        "text": "Diastolic blood pressure" 
       }, 
       "valueQuantity": { 
        "value": 75, 
        "unit": "mmHg", 
        "system": "http://unitsofmeasure.org", 
        "code": "mm[Hg]" 
       } 
      } 
     ] 
}