範例表單:衛福部初診病患基本資料卡空白表格
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<script src="./fhir.js"></script>
<title>Hello World!</title>
</head>
<body>
<h1>病患初診資料表</h1>
<form action="">
<label for="">姓名</label>
<input type="text" id="name">
<br><br>
<label for="">出生日期</label>
<input type="date" id="birthDate">
<br><br>
<label for="">性別</label>
<input type="radio" name="gender" id="gender_male" value="male">男
<input type="radio" name="gender" id="gender_female" value="female">女
<br><br>
<label for="">身分證字號</label>
<input type="text" id="uid">
<br><br>
<label for="">連絡電話(公)</label>
<input type="text" id="phone_work">
<br><br>
<label for="">連絡電話(宅)</label>
<input type="text" id="phone_home">
<br><br>
<label for="">連絡電話(手機)</label>
<input type="text" id="phone_mobile">
<br><br>
<label for="">聯絡地址</label>
<input type="text" id="address">
<br><br>
<label for="">電子信箱</label>
<input type="text" id="mail">
<br><br>
<label for="">緊急聯絡人-姓名</label>
<input type="text" id="contact_name">
<br><br>
<label for="">緊急聯絡人-關係</label>
<input type="text" id="contact_relationship">
<br><br>
<label for="">緊急聯絡人-聯絡電話</label>
<input type="text" id="contact_phone">
<br><br>
<button onclick="uploadFhirData()">送出</button>
</form>
</body>
</html>
function convertToFhir(data){
const fhirData = {
resourceType: "Patient",
identifier: [{
use: "official",
type: {
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "NI",
"display": "身分證字號"
},
value: data.uid
}],
name: [{
use: "official",
text: data.name
}],
birthDate: data.birthDate,
gender: data.gender,
telecom: [
{
system: "phone",
value: data.phone_home,
use: "home"
},
{
system: "phone",
value: data.phone_work,
use: "work"
}, {
system: "phone",
value: data.phone_mobile,
use: "mobile"
}, {
system: "email",
value: data.mail,
use: "home"
}
],
address: data.address,
contact: [{
relationship: [{
text: data.contact_relationship
}],
name: {
use: "official",
text: data.contact_name
},
telecom: [{
system: "phone",
value: data.contact_phone,
use: "home"
}]
}],
};
return fhirData;
}
function uploadFhirData(){
// 從表單抓取資料
const data = {
name: document.getElementById("name").value, // 姓名
birthDate: document.getElementById("birthDate").value, // 生日
gender: document.getElementById("gender_male").checked ? "male" : "female", // 性別
uid: document.getElementById("uid").value, // 身份證字號
phone_work: document.getElementById("phone_work").value, // 連絡電話(公)
phone_home: document.getElementById("phone_home").value, // 連絡電話 (宅)
phone_mobile: document.getElementById("phone_mobile").value, // 連絡電話 (手機)
address: document.getElementById("address").value, // 聯絡地址
mail: document.getElementById("mail").value, // 電子信箱
contact_name: document.getElementById("contact_name").value, // 緊急聯絡人-姓名
contact_relationship: document.getElementById("contact_relationship").value, // 緊急聯絡人-關係
contact_phone: document.getElementById("contact_phone").value // 連絡電話
}
console.log(convertToFhir(data));
}
{
"resourceType": "Patient",
"name": [
{
"use": "official",
"text": "王大明",
"family": "王",
"given": [
"大明"
]
}
],
"gender": "male",
"telecom": [
{
"system": "phone",
"value": "0912345678",
"use": "mobile"
}
],
"birthDate": "1995-01-01",
"address": [
{
"use": "home",
"type": "physical",
"text": "高雄市小港區大馬路999號",
"line": [
"大馬路999號"
],
"city": "高雄市",
"district": "小港區",
"postalCode": "812",
"country": "TW"
}
]
}
const axios = require('axios'); // 引入 axios
const util = require('util');
const payload = require('./payload.json'); // 引入 payload
const baseURL = "https://hapi.fhir.tw/baseDstu3"; // 設定 Base URL
axios.post(`${baseURL}/Patient`, payload) // 傳送 POST 請求
.then(res => {
console.log("傳送成功" + util.inspect(res.data, {
depth: null
}));
}).catch(err => {
console.log("發生錯誤" + util.inspect(err, {
depth: null
}));
});
$ npm init
$ npm i -S axios
$ node main.js
HL7 FHIR v4.0.1License: WTFPLGitHub issueshackmd-github-sync-badge
May 14, 2025楊宇凡(Lorex)
Feb 25, 2024[TOC] Prerequisites 這份指南將會使用 Rocky Linux 8.4 做為教學用的系統,Rocky Linux 8 是 CentOS 8 的替代版本,用起來一模一樣,如果你沒看過,現在讓你看看: Rocky Linux 8 官方網站:https://rockylinux.org/zh-tw/ 如果你有在使用 VMWare、VirtualBox 等虛擬化平台,可以考慮改用 Proxmox VE。他是一個開放原始碼的虛擬化平台,並提供一個類似 VMWare vCloud 的 Web 管理工具。你可以在上面開 QEMU VM 跟LXC Container,也可以在上面實現 Ceph、HA Cluster 等機制,全部都滑鼠點一點就好。 Proxmox VE 上面已經有 Rocky Linux 8 的 LXC Image,直接抓下來開就行了,請參考以下說明,或是你也可以參考 Jason(Proxmox VE 專家,江湖人稱"節神")的系列文章:
May 3, 2022題目: 患者 Ossas (使用既有已上傳的病人)主訴為咳嗽、喉嚨痛、頭痛,於 110/10/21 至高雄市立民生醫院(醫事機構代碼 0102080017)就診,診斷醫師姓名為鄭嘉宏。診斷結果為急性上呼吸道感染(ICD10: J06.9) 請使用 Bundle 上傳,並自行指定 ID。完成後貼上 Request Bundle 內容與各 Resource ID。 請參考:https://www.hl7.org/fhir/bundle-transaction.json.html { "resourceType": "Bundle", "type": "transaction", "entry": [
Oct 21, 2021or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up