forked from hflicka/arden2bytecode
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathx3.2.mlm
More file actions
96 lines (96 loc) · 4.39 KB
/
x3.2.mlm
File metadata and controls
96 lines (96 loc) · 4.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
maintenance:
title: Screen for hypercalcemia for Dr. B.'s study;;
mlmname: hypercalcemia_for_b;;
arden: Version 2;;
version: 2.02;;
institution: Columbia-Presbyterian Medical Center;;
author: George Hripcsak, M.D.;;
specialist: ;;
date: 1990-12-04;;
validation: research;;
library:
purpose:
Screen for hypercalcemia for Dr. B.'s study. (This MLM demonstrates screening patients for clinical trials.);;
explanation:
The storage of a serum calcium value evokes this MLM. If a serum albumin is available from the same blood sample as the calcium, then the corrected calcium is calculated, and patients with actual or corrected calcium greater than or equal 11.5 are accepted; if such a serum albumin is not available, then patients with actual calcium greater than or equal 11.0 are accepted. Patients with serum creatinine greater than 6.0 are excluded from the study.;;
keywords: hypercalcemia;;
citations: ;;
knowledge:
type: data-driven;;
data:
/* the storage of a calcium value evokes this MLM */
storage_of_calcium := event {'06210519','06210669'} ;
/* total calcium in mg/dL */
calcium := read last {'06210519','06210669';'CALCIUM'} ;
/* albumin in g/dL */
evoking_albumin := read last {'06210669';'ALBUMIN' where evoking} ;
/* albumin in g/dL; not necessarily from same test as Ca */
last_albumin := read last ({'06210669';'ALBUMIN'}
where it occurred within past 2 weeks) ;
/* creatinine in mg/dL; not necessarily from same test as Ca */
creatinine := read last ({'06210669','06210545','06000545';'CREAT'}
where it occurred within past 2 weeks) ;
;;
evoke:
storage_of_calcium;;
logic:
/* make sure the Ca is present (vs. hemolyzed, ...) */
IF calcium is not present THEN
conclude false ;
ENDIF ;
/* if creatinine is present and greater than 6, then stop now */
IF creatinine is present THEN
IF creatinine is greater than 6.0 THEN
conclude false ;
ENDIF ;
ENDIF ;
/* is an albumin present for the same sample as the calcium */
IF evoking_albumin is present THEN
/* calculate the corrected calcium */
IF evoking_albumin is less than 4.0 THEN
corrected_calcium := calcium + (4.0-evoking_albumin)*0.8 ;
ELSE
/* corrected is never less than actual */
corrected_calcium := calcium ;
ENDIF ;
/* test for total or corrected calcium >= 11.5 */
IF calcium >= 11.5 OR corrected_calcium >= 11.5 THEN
message1 := "calcium = " || calcium || " on " || time of calcium || " (corrected calcium = " || corrected_calcium || ")" ;
message1 := message1||" ; albumin = "||evoking_albumin ;
IF creatinine is present THEN
message1 := message1||
" ; last creatinine = "||creatinine ;
message1 := message1||
" ; (total or corrected calcium " ||
"was at least 11.5)" ;
conclude true ;
ELSE
conclude false ;
ENDIF ;
ENDIF;
/* no evoking albumin was present */
ELSE
/* check for true calcium >= 11.0 */
IF calcium >= 11.0 THEN
message1 := "calcium = "||calcium||" on "||time of calcium ;
IF last_albumin is present THEN
message1 := message1||" ; last albumin "||
"(not from same blood sample as calcium) = "||
last_albumin ;
IF creatinine is present THEN
message1 := message1|| " ; last creatinine = "
||creatinine ;
message1 := message1||
" ; (total calcium was at least 11.0; "||
"corrected calcium was not calculated)" ;
conclude true ;
ELSE
conclude false ;
ENDIF ;
ENDIF ;
ENDIF ;
ENDIF ;
;;
action: write "hypercalcemia study: " || message1;;
urgency: 50;;
end: