Skip to content

Latest commit

 

History

History
132 lines (110 loc) · 4.33 KB

README.zh-TW.md

File metadata and controls

132 lines (110 loc) · 4.33 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:

resource 不包含text欄位 The resources don't have text field

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

安裝

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_CSHARP_VALIDATOR=false
VALIDATION_FILES_ROOT_PATH="/validationResources"
VALIDATION_API_URL="http:https://burni-fhir-validator-api:7414"

設定後, 執行 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:https://example.com/fhir/Patient

  • getById (read)

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

  • getHistoryById (history, vread)

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

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

  • putById (update)

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

  • deleteById (delete)

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

範例

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

FHIR 驗證

感謝FirelyTeam/firely-net-sdk使用C#實作了讚讚的驗證器。

Burni 目前使用 C# Web API 去做驗證。使用專案: Chinlinlee/FHIR-Validator-API

TODO

  • Search parameters
    • composite
    • uri
  • Validation

Special project

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