# FHIR疫苗-台灣數位疫苗接種證明交換格式說明 ## Bundle介紹 ![](https://i.imgur.com/2oq7cEn.jpg) #### 情境說明 1. 建立疫苗注射的Document bundle,bundle裡面要包含Composition、Organization、Patient和Immunization的resource。 2. 查詢疫苗注射的Document bundle,要輸入建立的Patient id、時間以及哪個組織。 3. 建立Observation的Document bundle,bundle裡面要包含Composition、Organization、Patient和Observation的resource。 4. 查詢Observation的Document bundle,要輸入建立的Patient id、時間以及哪個組織。 #### 欄位說明 * resourceType:Bundle * id:暫時採用server端上的id。 * type: document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection * request:method:GET | HEAD | POST | PUT | DELEATE | PATCH <br>根據HTTPVerb(Required) <table> <tr> <th><b>欄位別</td> <th><b>EU JSON <br>Schema</td> <th><b>FHIR Path</td> <th><b>Constains</b></td> <th><b>採用<br>必要</b></td> </tr> <tr> <td rowspan="4"><b>數位證明證號</b><br>(包括:<br>發證機構編碼系統,<br>證號全球唯一識別碼,<br>有效日期起(迄)日)<br>(FHIR Constrains)</td> <td rowspan="4">v.ci<br>t.ci<br>r.ci<br>(Unique<br>certificate<br>identifier)</td> <td>Bundle.identifier[0].system</td> <td>指揮中心未統一規範前建議先採院所網址<br> <a href="https://www.vghtc.gov.tw">https://www.vghtc.gov.tw</a></td> <td>R</td> </tr> <tr> <td>Bundle.identifier[0].value</td> <td>證號全球唯一識別碼,建議:<br>TW.醫事機構代碼.發證日期年月日時分秒毫秒.流水號,或自訂唯一識別碼</td> <td>R</td> </tr> <tr> <td>Bundle.identifier[0].period.start</td> <td>發證日期=有效期限起日年月日</td> <td>R</td> </tr> <tr> <td>Bundle.identifier[0].period.end</td> <td>有效期限迄日年月日</td> <td>O</td> </tr> <tr> <td><b>Bundle Type</b><br>(FHIR Constraints)</td> <td>N/A</td> <td>Bundle.type</td> <td>document</td> <td>R</td> </tr> <tr> <td><b>證明發證時戳</b><br>(FHIR Constraints)</td> <td>N/A</td> <td>Bunle.timestamp</td> <td>FHIR日期格式必須包含至秒及時區</td> <td>R</td> </tr> <tr> <td><b>Bundle First entry</b><br>(FHIR Constraints)</td> <td>N/A</td> <td>Bundle.entry[0]</td> <td>必須為Composition Resource</td> <td>R</td> </tr> <tr> <td><b>Bundle entries</td> <td>N/A</td> <td>Bundle.entry[1]~[3]</td> <td>必須包含以下Resource:Organization,Patient,Immunization/Observation</td> <td>R</td> </table> ### Bundle–Document說明 * Document文件化,例如:電子病歷,將用藥紀錄、處置、手術報告、檢查結果…等,打包成bundle上傳。 - Document有幾個限制: 1. 一定要有identifier(必須要有system、value)。 2. 必須要有時間(timestamp)。 3. entry裡面的第1個(entry[0])一定要是Composition。 若沒有達成以上會被拒絕。 ### Bundle-transaction說明 - 可新增、刪除、修改,一次可以上傳很多個resource,resourece可以有新增、刪除、修改,不用全部一樣。 - 舉例: ```json= { "resourceType": "Bundle", "type": "transaction", "entry": [ { "resource": { "resourceType": "Medication", "id":"", "code": { "coding": [ { "system": " https://www1.nhi.gov.tw/QueryN/Query1.aspx ", "code": "AC363491G0", "display": "211 Metformin 500g" } ], "text": "克醣錠" } }, "request": { "method": "POST", "url": "/Medication/" } }, { "resource": { "resourceType": "Medication", "id": "BC25480100", "code": { "coding": [ { "system": "https://www1.nhi.gov.tw/QueryN/Query1.aspx", "code": "BC25480100", "display": "Galvus Met Tab. 50/500mg" } ], "text": "高糖優美膜衣錠" } }, "request": { "method": "PUT", "url": "/Medication/BC25480100" } }, ] } ``` ## <i class="fa fa-share-alt" style="font-size:36px;color:black"></i>Composition Resource說明 <table> <tr> <th><b>欄位別</b></th> <th>EU JSON <br>schema</th> <th>FHIR Path</th> <th>Constrains</th> <th>採用<br>必要</th> </tr> <tr> <td><b>證明摘要狀態</b></td> <td>N/A</td> <td>Composition.status</td> <td>final</td> <td>R</td> </tr> <tr> <td rowspan="3"><b>證明摘要種類</b></td> <td rowspan="3">t.tt<br>(檢測值<br>域同EU)</td> <td><font size="1">Composition.type.coding[0].system</td> <td><a href="http://loinc.org">http://loinc.org</td> <td>R</td> </tr> <tr> <td><font size="1">Composition.type.coding[0].value</td> <td>疫苗=82593-5<br>PCR=LP6464-4<br>快篩=LP217198-3</td> <td>R</td> </tr> <tr> <td><font size="1">Composition.type.coding[0].display</td> <td>疫苗=Immunization summary report<br>PCR=Nucleic acid amplification with probe detection<br>快篩=Rapid immunoassay</td> <td>R</td> </tr> <tr> <td><b>Patient Reference</b></td> <td>N/A</td> <td>Composition.subject</td> <td>urn:uuid:ResourceID</td> <td>R</td> </tr> <tr> <td><b>證明發證時戳</b></td> <td>N/A</td> <td>Composition.date</td> <td>FHIR日期格式<br>必須包含至秒及時區</td> <td>R</td> </tr> <tr> <td><b>摘要標題</b></td> <td>N/A</td> <td>Composition.title</td> <td>COVID-19 Vaccine/Test Certificate</td> <td>O</td> </tr> <tr> <td><b>發證單位</b></td> <td>N/A</td> <td>Composition.custodian</td> <td>urn:uuid:ResourceID</td> <td>R</td> </tr> <tr> <td><b>Composition Entries</b></td> <td>N/A</td> <td>Composition.section<br>.entry[0]~[2]</td> <td>必須包含以下Resource:Organization,Patient,Immunization/Observation<br>urn:uuid:ResourceID</td> <td>R</td> </tr> </table> ## <i class="fa fa-share-alt" style="font-size:36px;color:"></i> Organization / Location Resource說明 | 欄位別 | FHIR Path | 說明 | 採用<br>必要 | | -------- | --------------------- | -----------| ------------ | | 機構代碼 | Organization.identifier[0].value | 醫事機構代碼 | R | | 機構名稱 | Organization.name | 建議中英文名稱都放此 | R | | 機構別稱 | Organization.alias | 需要切換中英文名稱或簡稱時使用 | O | | 機構國籍 | Organizatioin.address.country | TW(ISO 3166) | R | | 欄位別 | FHIR Path | 說明 | 採用<br>必要 | | -------- | ------------------------ | -----------| ------------| | 機構代碼 | Location.identifier[0].value | 醫事機構代碼 | R | | 機構名稱 | Location.name | 建議中英文名稱都放此 | R | | 機構別稱 | Location.alias | 需要切換中英文名稱或簡稱時使用 | O | | 機構國籍 | Location.address.country | TW(ISO 3166) | R | ## <i class="fa fa-share-alt" style="font-size:36px;color:"></i> Patient Resource <table> <tr> <th><b>欄位別</b></th> <th><b>EU JSON Scema</b></th> <th><b>FHIR Path</b></th> <th><b>constrains</b></th> <th><b>採用必要</b></th> </tr> <tr> <td><b>姓名</b></td> <td>nam.fn & nam.gn</td> <td>Patient.name[0]</td> <td>family,given (有能力區分時), 全名放 text</td> <td>R</td> </tr> <tr> <td><b>英文姓名</b></td> <td>nam.fn & nam.gnt</td> <td>Patient.name[1]</td> <td>若出國使用需求<br>由民眾提供護照姓名</td> <td>O</td> </tr> <tr> <td><b>國內身分識別ID</b></td> <td>N/A</td> <td>Patient.identifier[0]</td> <td>暫用MI-TW</td> <td>R</td> </tr> <tr> <td><b>國外身分識別ID</b></td> <td>N/A</td> <td>Patient.identifier[1]</td> <td>暫用MI-TW,若出國使用需求<br>由民眾提供護照號碼 <td>O</td> </td> </tr> <tr> <td><b>性別</b></td> <td>N/A</td> <td>Patient.gender</td> <td>male |female |other| unknow</td> <td>R</td> </tr> <tr> <td><b>國籍</b></td> <td>N/A</td> <td>Patient.address.country</td> <td>TW(ISO 3166)<br>暫時先簡化實作</td> <td>R</td> </tr> <tr> <td><b>出生年月日</b></td> <td>dob</td> <td>Patient.birthDate</td> <td></td> <td>R</td> </tr> </table> :::warning <font size="1">Patient.identifier.system:需長期定義並維護,目前暫用MI-TW聯測定義,待之後衛福部統一制定 身分證號:https://www.dicom.org.tw/cs/identityCardNumber_tw 或指向內政部戶政司 https://www.ris.gov.tw 在台居留證號:https://www.dicom.org.tw/cs/ResidentNumber_tw 或指向內政部移民署 https://www.immigration.gov.tw 護照號碼:https://www.dicom.org.tw/cs/passportNumber 或指向外交部領事局 https://www.boca.gov.tw</font> ::: ## <i class="fa fa-share-alt" style="font-size:36px;color:black"></i> Immunization 1. ImmunizationRecomadation 建議施打的疫苗 2. MedicationRequest 藥物處方 3. ImmunizationEvalution 施打前評估 4. Immunization 疫苗事件 5. Observation 觀察 ![](https://i.imgur.com/28F8dLV.png) ### Immunization Resource | 欄位別 | FHIR Path | 說明 | 採用<br>必要 | | --- | -------- | -------- | -------- | | 目標疾病 | <font size="1">Immunization.protocolApplied.targetDisease | system=<a href="http://hl7.org/fhir/sid/icd-10">http://hl7.org/fhir/sid/icd-10<br>value=U07.1 | R | | 疫苗或預防措施 | Immunization.identifier[0] | J07BX03 covid-19 vaccines (ATC)<br>1119349007 COVID-19 mRNA vaccine (SNOMED CT)<br>1119305005 COVID-19 antigen vaccine (SNOMED CT) | O | | 疫苗代碼<br>vaccineProduct | Immunization.vaccineCode | system=<a href="https://www.cdc.gov.tw ">https://www.cdc.gov.tw <br>value= NIIS上傳代碼 ex: CoV_AZ | R | | 疫苗名稱 | Immunization.vaccineCode.display | display=AstraZeneca, Pfizer BioNTech, Moderna Biotech, Medigen | R | | 製造商 | Immunization.manufacturer|display=AstraZeneca、 Moderna等| R | | 劑別 | <font size="1">Immunization.protocolApplied.doseNumberPositiveInt | | R| | 完整劑數 | <font size="1">Immunization.protocolApplied.seriesDosesPositiveInt | |R| | 批號 | Immunization.lotNumber | | R | | 接種日期 | Immunization.occurence | | R | | 注射單位<br>(EU為發證單位) | <font size="2">Immunization.performer[0].actor(organization)<br>Immunization.location | 建議採用Organization<br>維護管理方便,資料量較小 | R | | 醫療人員 | <font size="2">Immunization.performer[1].actor.display (Practitioner) | display=醫事人員姓名 | R | | 接種國家 | <font size="2">Immunization.performer[0].actor.address.country<br>Immunization.location.address.country| TW(ISO 3166) | R | 疫苗表單 [Immunization](https://127.0.0.1:5502/FHIRdata2Table.html) ## <i class="fa fa-share-alt" style="font-size:36px;color:black"></i> Observation Resource說明 <table> <tr> <th><b>欄位別</b></th> <th><b>EU</b></th> <th><b>FHIR Path</b></th> <th><b>Constrains</b></th> <th><b>採用<br>必要</b></th> </tr> <tr> <td>TargetDisease</td> <td>t.tg</td> <td></td> <td></td> <td>N/A</td> </tr> <tr> <td>TypeOfTest</td> <td>t.tt</td> <td>同下Observation.code</td> <td></td> <td>N/A</td> </tr> <tr> <td><b>檢驗儀器</b></td> <td>t.ma</td> <td>Observation.device</td> <td></td> <td>N/A</td> </tr> <tr> <td rowspan="3"><b>檢驗代碼<br>與名稱</b></td> <td rowspan="3">t.nm</td> <td>Observation.code.coding[0].system</td> <td rowspan="3"><a href="http://loinc.org">http://loinc.org</a><br><font size="1">LP6464-4 Nucleic acid amplification with probe detection<br>LP217198-3 Rapid immunoassay</td> <td rowspan="3">R</td> </tr> <tr> <td>Observation.code.coding[0].code</td> </tr> <tr> <td>Observatuib.code.coding[0].dispaly</td> </tr> <tr> <td><b>採檢日</b></td> <td>t.sc</td> <td>Observation.effectivePeriod.start</td> <td></td> <td>R</td> </tr> <tr> <td><b>報告日</b></td> <td>N/A</td> <td>Observation.effectivePeriod.end<br>Observation.issued</td> <td>兩邊都填報告日<br>但issued無法搜尋</td> <td>R</td> </tr> <tr> <td><b>檢驗方法</b></td> <td>N/A</td> <td>Observation.mathod</td> <td><font size="1">驗測病毒的方式「PCR、Real-Time PCR、RT-PCR、RT-qPCR( Quantitative Reverse Transcription PCR)、NAA(Nucleic acid Amplification)、NAAT(Nucleic acid Amplification Test)、NAT(Nucleic acid Test)、LAMP(Loop-Mediated isothermal Amplification)、RT-LAMP、COVID-19 RNA test、SARS-CoV-2 RNA test 或Molecular Diagnostics」 此為CDC要求之欄位 system=<a href="https://www.cdc.gov.tw">https://www.cdc.gov.tw</a> </td> <td>O</td> </tr> <tr> <td><b>檢測結果</b></td> <td>t.tr</td> <td>Observation.value</td> <td>值域限制:Positive,Negative</td> <td>R</td> </tr> <tr> <td><b>檢驗單位</b></td> <td>t.tr</td> <td><font size="2">Observation.performer(Organization)</td> <td></td> <td>R</td> </tr> <tr> <td><b>(發證單位)</b></td> <td>t.is</td> <td><font size="2">Composition.custodian(見Composition)</td> <td></td> <td>R</td> </tr> <tr> <td><b>檢測國家</b></td> <td>t.co</td> <td><font size="2">Observation.performer.address.country</td> <td>TW(ISO 3166)</td> <td>R</td> </tr> </table> ## 參考國際發展/上線中標準草案 * WHO Smart Vaccination Certificate(IG) –https://apps.who.int/iris/rest/bitstreams/1359417/retrieve * EU Digital Green Certificate (IG) –https://build.fhir.org/ig/hl7-eu/dgc/index.html –https://ec.europa.eu/health/ehealth/covid-19_en * SMART Health Cards: Vaccination & Testing (IG) –http://build.fhir.org/ig/dvci/vaccine-credential-ig/branches/main/index.html –https://spec.smarthealth.cards –Vaccine Credential Initiative (VCI™) by The MITRE Corporation