MISAC dev
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Physical activity measures ## 應用情境 - 美國標準化運動紀錄建構指引:FHIR Physical Activity(PA) IG 指引中包含運動紀錄 (**Physical activity measures**) 規格 - 可記錄進行哪種運動(Activity performed)、運動進行時間(Activity duration)、運動過程平均及最大心律、估算消耗的卡路里等資訊 - 在 FHIR US PA IG 中,這些紀錄屬於 [measurement profile](https://build.fhir.org/ig/HL7/physical-activity/measures.html)... - 這可用 FHIR observation 紀錄,以記錄個別量; 運動距離、時間、最大心律等,分別以不同 FHIR observation 紀錄測註 A ## 註 A 1. 目前 US PA measures 公告內容,主要是針對心肺功能提升,規範其運動方式及量測數據規格。但運動種類及器材繁多,如肌力訓練、復健等領域,因其運動形式、配合的器材眾多,可產生許多深具參考價值的量測,但目前在 US FHIR PA 當中並無規範,可延伸 US PA measures 紀錄 2. 若一次觀察若包含多個數值,可用一個 FHIR observation 紀錄,於 [observation.component 當中紀錄多個同時量測的數值](https://hackmd.io/xcA3Jw2oT5qThxFV8YZ9JQ?view#Record-mutiple-value) 3. 運動過程紀錄之連續性波形或影片,與本文件格式不一,需另外訂立。 ## PA measure observation JSON 範例及主要的欄位 - 若已有公告規範,可基於公告規範整理範例,並延伸應用。若無可自行定義(也可與 AI 協作產生),在由專家審核後公告 - 本情境屬於上述方式 1,已有公告規範 ### 方式 1: [參考已公告的範例](https://build.fhir.org/ig/HL7/physical-activity/Observation-ExampleActivityCalories.json.html) - 這個 JSON 檔案是一個遵循 FHIR (Fast Healthcare Interoperability Resources) 標準的 Observation 資源範例,記錄了一位病患的活動卡路里消耗數據。 ```json= { "resourceType" : "Observation", "status" : "final", "category" : [{ "coding" : [{ "system" : "http://terminology.hl7.org/CodeSystem/observation-category", "code" : "activity" }] }, { "coding" : [{ "system" : "http://hl7.org/fhir/us/physical-activity/CodeSystem/pa-temporary-codes", "code" : "PhysicalActivity" }] }], "code" : { "coding" : [{ "system" : "http://loinc.org", "code" : "55424-6", "display" : "Calories burned in unspecified time Pedometer" }] }, "subject" : { "reference" : "http://example.org/Patient/1", "display" : "Example Patient" }, "effectiveDateTime" : "2022-06-08", "performer" : [{ "reference" : "http://example.org/Patient/1", "display" : "Example Patient" }], "valueQuantity" : { "value" : 738, "unit" : "kilocalories", "system" : "http://unitsofmeasure.org", "code" : "kcal" } } ``` ## 主要欄位說明 - 可上傳上述範例,由 chatGPT 或 deepSeek 產生欄位說明文件,應會有類似的說明。如下: ### 基本資訊 - **resourceType**: "Observation" - 表示這是一個觀察類型的資源 - **id**: "ExampleActivityCalories" - 此資源的唯一識別碼 - **status**: "final" - 表示此觀察結果是最終版本 ### 分類資訊 (category) 此觀察被歸類為: 1. "activity" - 來自 HL7 的觀察類別代碼系統 2. "PhysicalActivity" - 來自臨時物理活動代碼系統 ### 觀察項目 (code) - 使用 LOINC 代碼系統 - 代碼: "55424-6" - 顯示名稱: "Calories burned in unspecified time Pedometer" (計步器測量的未指定時間內燃燒的卡路里) ### 相關人員 - **subject**: 觀察對象,指向一位範例病患 (http://example.org/Patient/1) - **performer**: 觀察執行者,同樣是這位病患本人 ### 時間資訊 - **effectiveDateTime**: "2022-06-08" - 觀察結果的有效日期 ### 觀察值 (valueQuantity) - **value**: 738 - 數值 - **unit**: "kilocalories" - 單位(千卡) - **system**: "http://unitsofmeasure.org" - 使用 UCUM 單位系統 - **code**: "kcal" - 單位代碼 ### chatGPT 回應的總結 這個 JSON 檔案完整記錄了一位病患在 2022年6月8日 通過計步器測量到的卡路里消耗數據(738千卡),並提供了相關的元數據以便於系統間的數據交換和理解。它遵循了醫療資訊交換的 FHIR 標準,使用了標準化的代碼系統(如 LOINC 和 UCUM)來確保數據的一致性和可互操作性。 ### [方式2 完全由 AI 產生的結果](https://hackmd.io/rplnGnZ0Qq6WKhqNTqXQdw?view) - 當已有公告規範, AI 產生結果可能與 公告有差異,不建議如此做 ## 欄位及編碼 (規格) - 固定的欄位及編碼 - 產生實體 JSON需填寫的欄位 -- 必須及可能參考的 resources -- 特定種類的紀錄 (如 observation code, condition code...) -- 紀錄的資料或數值編碼(如 observation 可能包含數值及單位) ## FHIR resources 可變欄位分析說明 - 上述 JSON 範例,有多個欄位可在輸入介面(或 JSON 資料產生程式) 設定,以針對特定人員、特定項目的數據。 如上範例, 55424-6: 計步器測量的未指定時間內燃燒的卡路里,可調整成最大心跳,以支援多樣化的運動數據記錄需求 - 可向 AI 提問整理出可調整欄位: -- 請基於上述範例,分析那些欄位資料可在程式中調整,以針對特定人員,設定其各式運動紀錄,如消耗的卡路里、運動期間最大心跳等 ### DeepSeek 回應結果 根據提供的FHIR Observation資源範例,以下是可在程式中調整以針對特定人員設定運動紀錄的關鍵欄位,以及如何擴展來支援不同運動指標: --- ### **1. 受試者識別 (Subject)** - **調整欄位**:`subject.reference` - **用途**:綁定特定患者 - **範例調整**: ```json "subject": { "reference": "Patient/12345", // 改成實際患者ID "display": "張小明" } ``` --- ### **2. 運動指標類型 (Code)** - **調整欄位**:`code.coding` 中的 `code` 和 `display` - **用途**:定義記錄的運動指標類型(需配合LOINC或其他標準碼) - **擴展範例**: - **卡路里消耗**(沿用範例): ```json "code": { "coding": [{ "system": "http://loinc.org", "code": "55424-6", "display": "Calories burned" }] } ``` - **最大心率**: ```json "code": { "coding": [{ "system": "http://loinc.org", "code": "89269-0", "display": "Maximum heart rate during exercise" }] } ``` - **運動持續時間**: ```json "code": { "coding": [{ "system": "http://loinc.org", "code": "54899-0", "display": "Exercise duration" }] } ``` --- ### **3. 數值與單位 (ValueQuantity)** - **調整欄位**:`valueQuantity` 下的 `value`、`unit`、`code` - **用途**:記錄運動數據的實際值和單位 - **擴展範例**: - **卡路里**: ```json "valueQuantity": { "value": 500, "unit": "kilocalories", "system": "http://unitsofmeasure.org", "code": "kcal" } ``` - **最大心率**: ```json "valueQuantity": { "value": 165, "unit": "beats per minute", "system": "http://unitsofmeasure.org", "code": "/min" } ``` - **運動距離**: ```json "valueQuantity": { "value": 5.2, "unit": "kilometers", "system": "http://unitsofmeasure.org", "code": "km" } ``` --- ### **4. 時間範圍 (EffectiveDateTime)** - **調整欄位**:`effectiveDateTime` 或改用 `effectivePeriod` - **用途**:記錄運動時間或區間 - **擴展範例**: - **單次運動時間點**: ```json "effectiveDateTime": "2023-05-15T15:30:00+08:00" ``` - **長時間運動區間**: ```json "effectivePeriod": { "start": "2023-05-15T09:00:00+08:00", "end": "2023-05-15T10:30:00+08:00" } ``` --- ### **5. 執行者 (Performer)** - **調整欄位**:`performer` - **用途**:標記數據提供者(如患者本人或設備) - **範例調整**: ```json "performer": [{ "reference": "Device/fitbit-123", // 若數據來自穿戴設備 "display": "Fitbit Charge 5" }] ``` --- ### **6. 運動類別 (Category)** - **調整欄位**:`category.coding` - **用途**:進一步分類運動類型(可擴展自定義CodeSystem) - **擴展範例**: ```json "category": [{ "coding": [{ "system": "http://example.org/custom-codes", "code": "running", "display": "跑步" }] }] ``` --- ### **7. 擴展其他運動相關欄位** FHIR允許透過擴展(Extension)加入自定義數據,例如: - **運動強度**: ```json "extension": [{ "url": "http://example.org/extensions/exercise-intensity", "valueCode": "high" }] ``` - **運動地點**: ```json "extension": [{ "url": "http://example.org/extensions/location", "valueString": "健身房" }] ``` --- ### **完整調整後的範例(記錄最大心率)** ```json { "resourceType": "Observation", "status": "final", "category": [{ "coding": [{ "system": "http://hl7.org/fhir/us/physical-activity/CodeSystem/pa-temporary-codes", "code": "PhysicalActivity" }] }], "code": { "coding": [{ "system": "http://loinc.org", "code": "89269-0", "display": "Maximum heart rate during exercise" }] }, "subject": { "reference": "Patient/12345", "display": "張小明" }, "effectiveDateTime": "2023-05-15T15:30:00+08:00", "performer": [{ "reference": "Device/fitbit-123", "display": "Fitbit Charge 5" }], "valueQuantity": { "value": 165, "unit": "beats per minute", "system": "http://unitsofmeasure.org", "code": "/min" }, "extension": [{ "url": "http://example.org/extensions/exercise-intensity", "valueCode": "high" }] } ``` --- ### **程式設計建議** 1. **動態欄位映射**: 建立一個對照表,將運動類型(如跑步、游泳)映射到對應的LOINC codes和單位。 2. **驗證單位系統**: 確保單位符合UCUM標準(如心率單位為`/min`)。 3. **時間處理**: 若需精確記錄,改用`effectivePeriod`取代`effectiveDateTime`。 透過靈活調整上述欄位,即可支援多樣化的運動數據記錄需求。 ## 產生程式 - 可向 AI 提問: -- 無提供相關資訊 : 請提供產生 FHIR JSON 運動紀錄之 HTML 及 JS 網頁程式 -- 基於 JSON 範例: 請基於上述 JSON 範例,產生 FHIR 運動紀錄之 HTML 及 JS 網頁程式 -- [基於嚴謹的對照表(如 CSV)](https://hackmd.io/ZTfUQO-OQLKArMpuk5D-gw?view),利於: --- 資料產生及調閱端程式都基於對照表,確保互通性 --- 利於支援多國語言 --- [利於擴充(需再整理)](https://hackmd.io/QQhiZYZHSRqkNvc-OSNPHw) ### 使用設定檔以增強程式可擴展性 - 可將程式及設定檔分離,以利增強程式可擴展性。如向 chatGPT 提問: 使用者下載程式後,可透過設定檔改變其功能及介面,請列舉其優點 -- [chatGPT result](https://chatgpt.com/share/c5023b36-b4fa-4d95-a8f8-6d8519cd4fb4) ## [data provider 及 consumer](https://hackmd.io/8Gty-6YEQ-abrj5o0otmvw?view_) - 資料產生端 data provider 及資料使用端 data consumer 形成成對之資料處理模塊 -- 透過 FHIR server 互通資料 -- 基於明確的規格, 互通的資料可在 provider 及 consumer 兩端程式恰當處理 ## 常用之 search API

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully