Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
放射科医师如何借由开源软体增进效率
以自动化骨密度报告系统为例
蔡依达 (I-Ta Tsai)
(I-Ta Tsai)
PCMan tsaiid
进入正题
以开源软体
架構
自动化骨密度报告系统
來 偷懶 增进效率
I have no relevant financial or non-financial
relationship(s) within the products or
services described, reviewed, evaluated...
骨質疏鬆

Osteoporosis
Anatomy & Physiology, Connexions Web site. http://cnx.org/content/col11496/1.6/, Jun 19, 2013.
James Heilman, MD
CC BY-SA 3.0
?骨密度报告

Bone Density
脊
椎
髖
部
前
臂
性別
男女
≥ 50 y/o
< 50 y/o
停經前
停經後
Z Score
-2.0
Below
Within
T Score
-1.0
-2.5
Normal
Low Bone Mass
Osteoporosis
Average bone mineral density (BMD) of L1 to L4 is 0.939 gm/cm2, about
93% of the mean of young reference value (T-score = ...
Average bone mineral density (BMD) of L1 to L4 is 0.939 gm/cm2, about
93% of the mean of young reference value (T-score = ...
!
錄音
打字
+
科技始终来自於

人类的惰性
?How
LiberaBMD
A ruby-on-rails based web application for analysis
of Hologic bone densitometry. It provides a web
interface to ...
DB Schema
{
"l1_included":1,
"l2_included":1,
"l3_included":1,
"l4_included":1,
"l1_area":16.285641436031202,
"l1_bmc":16.9983834148...
{
"troch_area":12.187268473622307,
"troch_bmc":6.42159083076162,
"troch_bmd":0.5269097701966838,
"inter_area":20.527471477...
{
"ru13tot_area":6.06894105963075,
"ru13tot_bmc":3.3610065904212476,
"ru13tot_bmd":0.5538044540880316,
"rumidtot_area":12....
?T & Z Scores
自己斯構自己算
SCORE
{
"if_current":1,
"ethnic":"O",
"sex":"M",
"reftype":"S",
"bonerange":"1234",
"if_default":1,
"y_min":0.1,
"y_max":1.5,
"x...
REFERENCE CURVE
0.500
0.675
0.850
1.025
1.200
20 25 30 35 40 45 50 55 60 65 70 75 80 85 90
BMD + STD
BMD
BMD - STD
T- & Z-SCORE
z =
x µ
Standard score
?!
但计算出来的score
有时会有点小误差
Proper calculation of Z-­scores requires the use of an
accurate age value, i.e. you must calculate the actual
age (DXA Exa...
Export DB
EMR Request
Web API
AutoHotkey (AHK) is a free, open-source macro-creation
and automation software for Windows that allows users to
automate r...
• Expand abbreviations
• Mouse or keyboard macro
• Component Object Model (COM)
::btw::by the way
^k::
MouseMove, 111, 222...
; Access an IE object by WinTitle and Internet Explorer_Server Number
; By jethrow
; http://www.autohotkey.com/board/topic...
^l::
wb := WBGet()
!
myL =
(
acc_no = $('iframe[name=frameWork]').contents().find('input[name=OldAccNo]').val();
report_ar...
實際運作情況
發報告的速度真的比較快?
App 正確性足不足夠?
人工輸入正式報告正確性如何?
錯誤原因又是哪些?
0 s
400 s
800 s
1200 s
1600 s
264
1,452
p < 0.001
• 5,120 Exams

(2013-01-01 ~ 2013-12-31)




117
(98.3%)
2
(1.7%)
119
307
(95.4%)
14
(4.6%)
321
424 16 440
(p = 0.146)
DISCUSSIONS
前人的经验
Note: This copy is for your personal non-commercial use only.To order presentation-ready
copies for distribution to your c...
customized to i
mum of five stu
performed on t
from a different
BUT!
人生最厲害就是這個BUT!
c
m
p
f
1181INFORMATICS
The process of verbally reporting or manually retyping numeric data
Informatics in Radiology
Use of a Macr...
Quantitative Computed Tomography (QCT) as a Radiology
Reporting Tool by Using Optical Character Recognition
(OCR) and Macr...
Fig. 3 The QCT images and OCR-generated texts QCT report images
J Digit Imaging (2012) 25:815–818
Quantitative Computed Tomography (QCT) as a Radiology
Reporting Tool by Using Optical Character Recognition
(OCR) and Macr...




LIMITATIONS
Bone Densitometry 

Manufacturers
Bone Densitometry 

Manufacturers
CONCLUSIONS
https://github.com/tsaiid/libera-bmd

https://github.com/tsaiid/ahk-smartwonder
?自己報告自己救
Q&A
woodleywonderworks @ Flickr
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
COSCUP 2014 - 自動化骨密度報告系統
Upcoming SlideShare
Loading in …5
×

COSCUP 2014 - 自動化骨密度報告系統

519 views

Published on

骨密度 (Bone Mineral Density) 是由雙能 X 光吸光測定法 (DEXA) 檢測,依據年齡大小或是否已停經等條件,與健康成年人或是同年齡族群的骨密度進行比較,計算與參照族群標準差之差距,分別可計算出 T-Score 及 Z-Score,再依世界衛生組織的分級方式,可分為正常、骨量減少、骨質疏鬆症等程度。

目前 DEXA 測量完的骨密度數據及分析會以圖檔報告的方式存放於醫療影像儲傳系統 (PACS) 中,再由放射線科醫師將需要參照的數字選填,並將其骨密度分級。這類的「工人」智慧不僅費時費力,更可能因為誤判數字而產生錯誤的報告。

因此,我利用 Ruby on Rails 這套 Framework,建立一個自動化報告系統,在匯入 DEXA 資料後,可計算 T-Score 及 Z-Score,並依標準診斷流程產生報告內文,再搭配 AutoHotKey 巨集來與原始報告系統整合。

導入此系統後,完成報告的時間可縮短 82% (p < 0.001)。回溯性的分析可以發現自動報告與人工報告的正確率分別為 98.8% 及 93.7% (p < 0.001),其中自動報告的錯誤原因來自於技術員輸入錯誤 (0.64%, 33/5120) 及需人為判讀之複雜情況 (0.57%, 29/5120)。

目前此專案公開於 GitHub 上,名為 LiberaBMD。

Published in: Technology
  • Be the first to comment

  • Be the first to like this

COSCUP 2014 - 自動化骨密度報告系統

  1. 1. 放射科医师如何借由开源软体增进效率 以自动化骨密度报告系统为例 蔡依达 (I-Ta Tsai)
  2. 2. (I-Ta Tsai)
  3. 3. PCMan tsaiid
  4. 4. 进入正题
  5. 5. 以开源软体 架構 自动化骨密度报告系统 來 偷懶 增进效率
  6. 6. I have no relevant financial or non-financial relationship(s) within the products or services described, reviewed, evaluated or compared in this presentation.
  7. 7. 骨質疏鬆
 Osteoporosis
  8. 8. Anatomy & Physiology, Connexions Web site. http://cnx.org/content/col11496/1.6/, Jun 19, 2013.
  9. 9. James Heilman, MD CC BY-SA 3.0
  10. 10. ?骨密度报告
 Bone Density
  11. 11. 脊 椎
  12. 12. 髖 部
  13. 13. 前 臂
  14. 14. 性別 男女 ≥ 50 y/o < 50 y/o 停經前 停經後 Z Score -2.0 Below Within T Score -1.0 -2.5 Normal Low Bone Mass Osteoporosis
  15. 15. Average bone mineral density (BMD) of L1 to L4 is 0.939 gm/cm2, about 93% of the mean of young reference value (T-score = -0.6). The BMD of right proximal femur is 0.711 gm/cm2, and is about 84% of the mean of young reference value (T-score = -1.4). The BMD of right 1/3 forearm is 0.666 gm/cm2, about 97% of the mean of young reference value (T-score = -0.3). Conclusion: The BMD meets the criteria of low bone mass, according to the WHO (World Health Organization) classification.
  16. 16. Average bone mineral density (BMD) of L1 to L4 is 0.939 gm/cm2, about 93% of the mean of young reference value (T-score = -0.6). The BMD of right proximal femur is 0.711 gm/cm2, and is about 84% of the mean of young reference value (T-score = -1.4). The BMD of right 1/3 forearm is 0.666 gm/cm2, about 97% of the mean of young reference value (T-score = -0.3). Conclusion: The BMD meets the criteria of low bone mass, according to the WHO (World Health Organization) classification.
  17. 17. ! 錄音 打字 +
  18. 18. 科技始终来自於
 人类的惰性
  19. 19. ?How
  20. 20. LiberaBMD A ruby-on-rails based web application for analysis of Hologic bone densitometry. It provides a web interface to show the patient and examination lists, and with a pre-defined reporting template, it generates the final report according to the interpretation algorithm of bone mineral density. It also has web APIs for the final report generation, which can be integrated into other radiology information system. https://github.com/tsaiid/libera-bmd!
  21. 21. DB Schema
  22. 22. { "l1_included":1, "l2_included":1, "l3_included":1, "l4_included":1, "l1_area":16.285641436031202, "l1_bmc":16.99838341485105, "l1_bmd":1.043765054119572, "l2_area":18.333654385665113, "l2_bmc":20.458727470207037, "l2_bmd":1.1159110475107186, "l3_area":17.929959525400736, "l3_bmc":19.19764387749801, "l3_bmd":1.070702019728566, "l4_area":18.29426952124908, "l4_bmc":18.99286785102212, "l4_bmd":1.0381867299463152, "tot_area":70.84352486834612, "tot_bmc":75.64762261357822, "tot_bmd":1.06781279946417, } SPINE
  23. 23. { "troch_area":12.187268473622307, "troch_bmc":6.42159083076162, "troch_bmd":0.5269097701966838, "inter_area":20.527471477257816, "inter_bmc":17.39763568286712, "inter_bmd":0.8475294047852795, "neck_area":5.237099303926052, "neck_bmc":3.387444524551131, "neck_bmd":0.6468169358583088, "wards_area":1.1355205967391069, "wards_bmc":0.4129044211119751, "wards_bmd":0.3636256553141525, "htot_area":37.951839254806174, "htot_bmc":27.20667103817987, "htot_bmd":0.7168735843213304, } HIP
  24. 24. { "ru13tot_area":6.06894105963075, "ru13tot_bmc":3.3610065904212476, "ru13tot_bmd":0.5538044540880316, "rumidtot_area":12.08358326600947, "rumidtot_bmc":5.287974125787681, "rumidtot_bmd":0.4376163931987372, "ruudtot_area":7.000375234646343, "ruudtot_bmc":1.9609613883207748, "ruudtot_bmd":0.2801223252455898, "rutot_area":25.15289956028656, "rutot_bmc":10.609942104529702, "rutot_bmd":0.4218178536076827, } FOREARM
  25. 25. ?T & Z Scores
  26. 26. 自己斯構自己算 SCORE
  27. 27. { "if_current":1, "ethnic":"O", "sex":"M", "reftype":"S", "bonerange":"1234", "if_default":1, "y_min":0.1, "y_max":1.5, "x_min":20.0, "x_max":90.0, "age_young":25.0, } REFERENCE CURVE x_value y_value std l_value 20.0 1.017 0.111 1.0 25.0 1.017 0.111 1.0 35.0 1.009 0.121 1.0 45.0 0.964 0.119 1.0 55.0 0.941 0.138 1.0 65.0 0.913 0.138 1.0 75.0 0.895 0.159 1.0 85.0 0.892 0.115 1.0
  28. 28. REFERENCE CURVE 0.500 0.675 0.850 1.025 1.200 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 BMD + STD BMD BMD - STD
  29. 29. T- & Z-SCORE z = x µ Standard score
  30. 30. ?! 但计算出来的score 有时会有点小误差
  31. 31. Proper calculation of Z-­scores requires the use of an accurate age value, i.e. you must calculate the actual age (DXA Exam Date – Patient birth Date). This will yield an age such as 56.77547634, not 56.0. Next you must linearly interpolate between the Reference BMD just above and just below the subject’s actual age to get the actual age-­matched BMD value. “ ” Thomas Kelly Principal Scientist at Hologic
  32. 32. Export DB EMR Request Web API
  33. 33. AutoHotkey (AHK) is a free, open-source macro-creation and automation software for Windows that allows users to automate repetitive tasks. It is driven by a scripting language that was initially aimed at providing keyboard shortcuts, otherwise known as hotkeys, that over time evolved into a full-fledged scripting language.
  34. 34. • Expand abbreviations • Mouse or keyboard macro • Component Object Model (COM) ::btw::by the way ^k:: MouseMove, 111, 222 Click Send ^v Return
  35. 35. ; Access an IE object by WinTitle and Internet Explorer_Server Number ; By jethrow ; http://www.autohotkey.com/board/topic/47052-basic-webpage-controls-with- javascript-com-tutorial/ ! WBGet(WinTitle="ahk_class IEFrame", Svr#=1) { ;// based on ComObjQuery docs static msg := DllCall("RegisterWindowMessage", "str", "WM_HTML_GETOBJECT") , IID := "{0002DF05-0000-0000-C000-000000000046}" ;// IID_IWebBrowserApp ;// , IID := "{332C4427-26CB-11D0-B483-00C04FD90119}" ;// IID_IHTMLWindow2 SendMessage msg, 0, 0, Internet Explorer_Server%Svr#%, %WinTitle% if (ErrorLevel != "FAIL") { lResult:=ErrorLevel, VarSetCapacity(GUID,16,0) if DllCall("ole32CLSIDFromString", "wstr","{332C4425-26CB-11D0- B483-00C04FD90119}", "ptr",&GUID) >= 0 { DllCall("oleaccObjectFromLresult", "ptr",lResult, "ptr",&GUID, "ptr",0, "ptr*",pdoc) return ComObj(9,ComObjQuery(pdoc,IID,IID),1), ObjRelease(pdoc) } } }
  36. 36. ^l:: wb := WBGet() ! myL = ( acc_no = $('iframe[name=frameWork]').contents().find('input[name=OldAccNo]').val(); report_area = $('iframe[name=frameWork]').contents().find('textarea[name=ReportContent]'); ! $.support.cors = true; ! // jquery plugin for IE8, IE9 cross domain ajax $.getScript( "http://cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/ 1.0.1/jquery.xdomainrequest.min.js"); ! $.ajax({ dataType: "json", url: "http://vghks.tsai.it/bone-density/studies/report/" + acc_no + "/text", crossDomain: true }).done(function(data){ if (data.report) report_area.val(data.report); else alert("No data available. Please check the database."); }); ) ! window := wb.document.parentWindow window.execScript(myL) Return
  37. 37. 實際運作情況
  38. 38. 發報告的速度真的比較快? App 正確性足不足夠? 人工輸入正式報告正確性如何? 錯誤原因又是哪些?
  39. 39. 0 s 400 s 800 s 1200 s 1600 s 264 1,452 p < 0.001
  40. 40. • 5,120 Exams
 (2013-01-01 ~ 2013-12-31)
  41. 41.
  42. 42.
  43. 43. 117 (98.3%) 2 (1.7%) 119 307 (95.4%) 14 (4.6%) 321 424 16 440 (p = 0.146)
  44. 44. DISCUSSIONS
  45. 45. 前人的经验
  46. 46. Note: This copy is for your personal non-commercial use only.To order presentation-ready copies for distribution to your colleagues or clients, contact us at www.rsna.org/rsnarights. 1181INFORMATICS The process of verbally reporting or manually retyping numeric data generated at dual-energy x-ray absorptiometry (DXA) involves numer- ous pitfalls.With use of a macro scripting editor, a customized macro was created to automate the transfer of data generated by a DXA Informatics in Radiology Use of a Macro Scripting Editor to Facilitate Transfer of Dual-Energy X-ray Absorptiometry Reports into an Existing Departmental Voice Recognition Dictation System1
  47. 47. customized to i mum of five stu performed on t from a different
  48. 48. BUT! 人生最厲害就是這個BUT!
  49. 49. c m p f
  50. 50. 1181INFORMATICS The process of verbally reporting or manually retyping numeric data Informatics in Radiology Use of a Macro Scripting Editor to Facilitate Transfer of Dual-Energy X-ray Absorptiometry Reports into an Existing Departmental Voice Recognition Dictation System1 Not Open Source
  51. 51. Quantitative Computed Tomography (QCT) as a Radiology Reporting Tool by Using Optical Character Recognition (OCR) and Macro Program Young Han Lee & Ho-Taek Song & Jin-Suck Suh Published online: 8 March 2012 # Society for Imaging Informatics in Medicine 2012 Abstract The objectives are (1) to introduce a new concept of making a quantitative computed tomography (QCT) reporting system by using optical character recognition (OCR) and macro program and (2) to illustrate the practical usages of the QCT reporting system in radiology reading Keywords Computer in medicine . PACS . OCR . QCT. Reading room Introduction J Digit Imaging (2012) 25:815–818 DOI 10.1007/s10278-012-9464-8
  52. 52. Fig. 3 The QCT images and OCR-generated texts QCT report images J Digit Imaging (2012) 25:815–818
  53. 53. Quantitative Computed Tomography (QCT) as a Radiology Reporting Tool by Using Optical Character Recognition (OCR) and Macro Program Young Han Lee & Ho-Taek Song & Jin-Suck Suh Published online: 8 March 2012 # Society for Imaging Informatics in Medicine 2012 J Digit Imaging (2012) 25:815–818 DOI 10.1007/s10278-012-9464-8 Not Open Source
  54. 54.
  55. 55.
  56. 56. LIMITATIONS
  57. 57. Bone Densitometry 
 Manufacturers
  58. 58. Bone Densitometry 
 Manufacturers
  59. 59. CONCLUSIONS
  60. 60. https://github.com/tsaiid/libera-bmd
 https://github.com/tsaiid/ahk-smartwonder
  61. 61. ?自己報告自己救
  62. 62. Q&A
  63. 63. woodleywonderworks @ Flickr

×