## 期末報告Observation - Calories per Day(每天卡路里) :::success 前往官網找尋想要的期末作業 https://build.fhir.org/ig/HL7/physical-activity/toc.html ::: ![image](https://hackmd.io/_uploads/BJrHhX5ua.png) :::success 我挑選Observation - Calories per Day作為期末作業 ::: ![image](https://hackmd.io/_uploads/SJQe6Q9_T.png) :::success 進去裡面會是這範例Observation - Calories per Day的內容介紹 而我們需要練習的是使用官網提供的json範例去**改變上次作業的內容** ::: ![image](https://hackmd.io/_uploads/SJPUEEqOp.png) ### JSON範例內容 ![image](https://hackmd.io/_uploads/S1Bl4Ncd6.png) :::info 上次作業的檔案下載 Post: https://github.com/shen1201/FHIR_POST Get : https://github.com/shen1201/FHIR_GET ::: ### :books: 第一步 : Calories per Day範例用在上次作業 :::success 打開上次的Post程式,尋找到jsonObj變數 ::: ![2024-01-09 105314](https://hackmd.io/_uploads/ry16LEqu6.png) :::success 把內容改成官方的josn範例 ::: ![image](https://hackmd.io/_uploads/BJUeOE9d6.png) ### :books: 第二步 : 修改json內容 :::success 找到subject跟performer準備進行修改 ::: ![image](https://hackmd.io/_uploads/SkbgsEqOT.png) **補充 code:41979-6為此範例的LOINC代碼** :::success 繼續使用上次創過的病人ID:34597018進行修改 修改為下圖 :arrow_down: ::: ![image](https://hackmd.io/_uploads/SydrTE5u6.png) ### :books: 第三步 : 修改body內容 :::success 把上次作業的內容骨質疏鬆,改成每日卡路里 ::: ![image](https://hackmd.io/_uploads/r1AgC49da.png) :::success 改變成下圖:arrow_down: ::: ![image](https://hackmd.io/_uploads/BktmAEcdp.png) ### 開始Post資料 :::success 執行程式碼 ::: ![image](https://hackmd.io/_uploads/HJepRNq_T.png) :::success 輸入卡路里進行Post ::: ![image](https://hackmd.io/_uploads/By-lyHqdp.png) :::success 按F12到Console確認是否有成功上傳成功 ::: ![image](https://hackmd.io/_uploads/BkxGUr5uT.png) ### 開始獲得上傳的資料 :::success 打開上次的Get程式碼 把Function裡面要查詢的病人再加一個條件,指定要是code為41979-6 這樣就能指定Get到的內容為消耗卡路里 ::: ![image](https://hackmd.io/_uploads/SkyLZBcOT.png) :::success 修改為下圖 :arrow_down: ::: ![image](https://hackmd.io/_uploads/SyeTfrcup.png) :::success 上次輸出的內容,進行進行調整、排版 ::: ![image](https://hackmd.io/_uploads/H1Rw7H5ua.png) :::success 如下圖 :arrow_down: ::: ![image](https://hackmd.io/_uploads/ByPhQH5up.png) ### 開始執行Get程式碼 ![image](https://hackmd.io/_uploads/HJN-4B9d6.png) :::success 按下Get data ::: ![image](https://hackmd.io/_uploads/ryA4VB9da.png) :::success 成功Get到上傳的程式碼 ::: ## 修改完後的程式碼 :::info Post: https://github.com/shen1201/Calories_Post Get : https://github.com/shen1201/Calories_Get ::: # 結束