2017-01-04 8 views
0

私は、FHIR(hir-open-api-dstu2.smarthealthit.org)データベース上でバイタルスをスマートに書く例を探しています。ここでFHIRでスマートにバイタルを書く

は、私は読むの患者人口統計のhttp://docs.smarthealthit.org/tutorials/server-quick-start/

例で見つけたものです:

カール 'https://fhir-open-api-dstu2.smarthealthit.org/Patient/1482713' -H '受け入れ:アプリケーション/ JSON'

例をバイタルを取得するには:

カール 'https://fhir-open-api-dstu2.smarthealthit.org/Observation?subject%3APatient=1482713&code=3141-9%2C8302-2%2C8287-5%2C39156-5&_count=50' -H '承諾:アプリケーション/ 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

ジョシュの完全な例は、ここで見つけることができます:https://groups.google.com/forum/#!topic/smart-on-fhir/I9xwM8aEdM4 1)患者IDが提供されていないいくつかの明確化のための –

答えて

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"}' 

そしてもちろん、あなたがこれはジョシュMさんに基づいています

+0

要求 - DO PatientID 1482713に対して件名%3APatient = 1482713を追加しますか? 2)resourceTypeはLOINCコードですか(例えば、Systolic BPの場合は8480-6、拡張期BPの場合は8462-4)。Observationは送信される値ですか?私たちがLOINCコードを入力として取得すると、コードはとなり、これは書き込みには見当たりません。 –

0

:-)データペイロードにあなたの観察の詳細を提供する必要があります応答:

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 

有効日、血圧およびその2つの成分を有する複数の定義されたペイロード・ファイル: --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]" 
       } 
      } 
     ] 
}