Skip to content

Latest commit

 

History

History
135 lines (112 loc) · 4.36 KB

README.zh-TW.md

File metadata and controls

135 lines (112 loc) · 4.36 KB

Burni FHIR Server

English | 繁體中文
Burni 使用 Node.JS 、Express 框架以及 MongoDB 實作 FHIR R4 Server,經由簡單的設定即可產生指定 FHIR Resource的 Mongoose Schema、API程式碼並可自行更改,滿足需求。目前Burni支援Windows以及Linux,讓開發人員可以快速架設 FHIR Server。
Burni 所使用的 FHIR 版本為 v4.0.1。

Server 能力聲明

Burni 使用 AEGIS Touchstone Basic-R4-Server 測試.

測試結果:

支援功能

This server supported FHIR RESTFul API below:

Don't remove Bundle.js in models/mongodb/FHIRTypeSchema

必要環境

  • node.js >= 16
  • MongoDB >= 4
  • Java JDK >= 11 (For validator)

安裝

npm install

設定

設定檔位於 config\config.js

module.exports = {
    // add the resource name that you need
    "Patient" : { 
        "interaction": {
            "read": true,
            "vread": true,
            "update": true,
            "delete": true,
            "history": true,
            "create": true,
            "search": true
        }
    }
}

dotenv in root path .env

MONGODB_NAME="dbName"
MONGODB_HOSTS=["mongodb"]
MONGODB_PORTS=[27017]
MONGODB_USER="myAdmin"
MONGODB_PASSWORD="MymongoAdmin1"
MONGODB_IS_SHARDING_MODE=false
MONGODB_SLAVEMODE=false

SERVER_PORT=8080 

FHIRSERVER_HOST="localhost"
FHIRSERVER_PORT=8080 #use by creating bundle url
FHIRSERVER_APIPATH="fhir"

#If u want to use token auth, add below.
ENABLE_TOKEN_AUTH=true
ADMIN_LOGIN_PATH="adminLogin"  
ADMIN_USERNAME="adminUsername"
ADMIN_PASSWORD="adminPassword"

ENABLE_CHECK_ALL_RESOURCE_ID=false #true that want to check resource id cross all resource
ENABLE_CHECK_REFERENCE #true that want to check reference is exist in resource content
    
ENABLE_VALIDATOR=true

設定後, 執行 npm run build 產生 resource 相關程式碼

npm run build

TypeError: genParamFunc[type] is not a function 代表此類型的搜尋參數目前不支援。

啟動服務

node server.js

RESTful API

  • get (search)
    • Number
    • Date (DateTime, Instance Not yet)
    • String
    • Token
    • Reference

GET http://example.com/fhir/Patient

  • getById (read)

GET http://example.com/fhir/Patient/123

  • getHistoryById (history, vread)

GET http://example.com/fhir/Patient/_history/

GET http://example.com/fhir/Patient/_history/1

  • putById (update)

PUT http://example.com/fhir/Patient/1

  • deleteById (delete)

DELETE http://example.com/fhir/Patient/1

範例

詳細使用 Postman 的範例: Examples Using Postman

FHIR 驗證

Burni 使用 node-java-fhir-validator 做驗證

  • 您可以將 IG 的 package.tgz 或是 json (StructureDefinition) 檔案放入 utils/validator/igs,Burni 將會讀取這些檔案至 validator 當中
  • 您必須將 .env(dotenv) 內的 ENABLE_VALIDATOR 設定為 true 以開啟驗證功能

TODO

  • Search parameters

    • composite
    • uri
  • Narrative generate

Special project

  • Raccoon - a noSQL-based DICOMWeb Server.
  • ngs2fhir - Convert the next generation sequencing (NGS) data to the FHIR Resources.