source: WorldVistAEHR/trunk/r/SURGERY-SR/SROLABS.m@ 1259

Last change on this file since 1259 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1SROLABS ;BIR/SJA - ENTER/EDIT RISK MODEL LAB TEST ;12/19/07
2 ;;3.0; Surgery ;**166**;24 Jun 93;Build 7
3EN N SRIEN,SRSP,SRTNM,SRTP,SRX,Y
4 S SRSOUT=0 D LIST G:SRSOUT END
5 D DSPLY G:SRSOUT END
6 I SREDIT D EDIT
7 G EN
8END D ^SRSKILL K SREDIT,SRFIRST,SRLABNM,SRSPNM
9 Q
10LIST ; display test list
11 W @IOF,!,?11,"Risk Model Lab Test (Enter/Edit)",!!," Select item to edit from list below:",!
12 W !," 1. ALBUMIN",?32,"14. LDL"
13 W !," 2. ALKALINE PHOSPHATASE",?32,"15. PLATELET COUNT"
14 W !," 3. ANION GAP",?32,"16. POTASSIUM"
15 W !," 4. BUN",?32,"17. PT"
16 W !," 5. CHOLESTEROL",?32,"18. PTT"
17 W !," 6. CPK",?32,"19. SGOT"
18 W !," 7. CPK-MB",?32,"20. SODIUM"
19 W !," 8. CREATININE",?32,"21. TOTAL BILIRUBIN"
20 W !," 9. HDL",?32,"22. TRIGLYCERIDE"
21 W !,"10. HEMATOCRIT",?32,"23. TROPONIN I"
22 W !,"11. HEMOGLOBIN",?32,"24. TROPONIN T"
23 W !,"12. HEMOGLOBIN A1C",?32,"25. WHITE BLOOD COUNT"
24 W !,"13. INR",!
25 K DIR S DIR("?")="Select the number from the list for the lab test you want to edit."
26 S DIR(0)="NAO^1:25",DIR("A")="Enter number (1-25): " D ^DIR K DIR I $D(DTOUT)!$D(DUOUT)!'Y S SRSOUT=1 Q
27 D TEST
28 Q
29EDIT ; update selected field
30 W ! K DR,DIE,DA S DA=SRIEN,DIE=139.2,DR="[SROALAB]" D ^DIE K DA,DIE,DR
31 Q
32DSPLY ; display test information from file 139.2
33 W @IOF,!,?11,"Risk Model Lab Test (Enter/Edit)",!!!,?16,"Test Name: "_SRLABNM,!!," Laboratory Data Name(s): "
34 I '$O(^SRO(139.2,SRIEN,1,0)) W "NONE ENTERED"
35 S SRX=0,SRFIRST=1 F S SRX=$O(^SRO(139.2,SRIEN,1,SRX)) Q:'SRX D
36 .S SRTP=$P($G(^SRO(139.2,SRIEN,1,SRX,0)),"^"),Y=SRTP,C=$P(^DD(139.21,.01,0),"^",2) D Y^DIQ S SRTNM=Y
37 .W:'SRFIRST ! W ?27,SRTNM S SRFIRST=0
38 S SRSPNM="NONE ENTERED",SRSP=$P($G(^SRO(139.2,SRIEN,2)),"^") I SRSP S Y=SRSP,C=$P(^DD(139.2,2,0),"^",2) D Y^DIQ S SRSPNM=Y
39 W !!,?17,"Specimen: ",SRSPNM,!!
40 K DIR S DIR(0)="YA",DIR("A")="Do you want to edit this test ? ",DIR("B")="NO" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1 Q
41 S SREDIT=Y
42 Q
43TEST ; match with entry in file 139.2
44 I Y<14 S SRIEN=$S(Y=2:15,Y=3:26,Y=4:8,Y=5:24,Y=6:9,Y=7:10,Y=8:7,Y=9:21,Y=10:17,Y=11:1,Y=12:27,Y=13:25,1:11)
45 I Y>13 S SRIEN=$S(Y=14:23,Y=15:18,Y=16:5,Y=17:19,Y=18:20,Y=19:13,Y=20:4,Y=21:14,Y=22:22,Y=23:2,Y=24:3,1:16)
46 S SRLABNM=$P(^SRO(139.2,SRIEN,0),"^")
47 Q
Note: See TracBrowser for help on using the repository browser.