此篇將帶大家了解基本的FHIR Resource content、Data Types並組出第一個Patient JSON。
必備知識
- JSON
FHIR Data Types
- Primite Types 是最基本的(而且只有 Primive Type 是首字小寫),以程式來看就是常見的string、int、float這種型態
- 其餘Types,都是以所有Types複合組成的Type,以程式來看就像是Class、Interface、Object
FHIR Resource Content
以下是Resource Content的小小說明
Note:欄位名稱
、數量
、資料型態
是組成Resource的關鍵重點。
看文件組JSON的小技巧
- 看到Type小寫且Card.(數量)為0…1
- 看到Type小寫且Card.(數量)為0…*
- 看到Type大寫且Card.(數量)為0…1
- 看到Type大寫且Card.(數量)為0…*
組出Patient Resource JSON
- 病人英文姓名為「Jennifer Lopez」,中譯姓名為「珍妮佛羅培茲」
- 這是他的照片:https://i.imgur.com/VeTQheO.png
- 護照號碼:65848725
- 聯絡電話:(宅) 07–2159685 (公) 07–7938888 (手機) 0912–354879
- 聯絡地址:高雄市橋頭區經武路 58 號 24 樓之 11
- 戶籍地址同聯絡地址
- 緊急聯絡人姓名:余智波鮭魚
- 緊急聯絡人電話:(手機) 0988–878545
- 緊急聯絡人關係:父子
- 病人慣用溝通之語言為英文(en-US)
/*
病人英文姓名為「Jennifer Lopez」,中譯姓名為「珍妮佛羅培茲」 x
這是他的照片:https://i.imgur.com/VeTQheO.png x
護照號碼:65848725 x
聯絡電話:(宅) 07–2159685 (公) 07–7938888 (手機) 0912–354879 x
聯絡地址:高雄市橋頭區經武路 58 號 24 樓之 11 x
戶籍地址同聯絡地址
緊急聯絡人姓名:余智波鮭魚 x
緊急聯絡人電話:(手機) 0988–878545 x
緊急聯絡人關係:父子
病人慣用溝通之語言為英文(en-US) x
*/
let patient =
{
"resourceType": "Patient",
"identifier": [
{
"use": "official",
"type": {
"coding": [
{
"system": "https://www.hl7.org/fhir/v2/0203/index.html",
"code": "PPN",
"display": "Passport number"
}
],
"text": "passport number"
}
}
],
"gender": "male",
"name": [
{
"use": "official",
"text": "Jennifer Lopez",
"family": "Lopez",
"given": [
"Jennifer"
]
},
{
"use": "usual",
"text": "珍妮佛羅培茲",
"family": "羅培茲",
"given": [
"珍妮佛"
]
}
],
"telecom": [
{
"system": "phone",
"use": "home",
"value": "07–2159685"
},
{
"system": "phone",
"use": "work",
"value": "07–7938888"
},
{
"system": "phone",
"use": "mobile",
"value": "0912–354879"
}
],
"address": [
{
"text": "高雄市橋頭區經武路 58 號 24 樓之 11"
}
],
"photo": [
{
"url": "https://i.imgur.com/VeTQheO.png"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0131",
"code": "C",
"display": "Emergency Contact"
}
],
"text": "緊急聯絡人"
},
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0131",
"code": "N",
"display": "Next-of-Kin",
"text": ""
}
],
"text": "父子"
}
],
"name": {
"use": "official",
"text": "余智波鮭魚"
},
"telecom": [
{
"system": "phone",
"use": "mobile",
"value": "0988–878545"
}
]
}
],
"communication": [
{
"language" : {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "en-US"
}
]
},
"preferred": true
}
]
}