source: WorldVistAEHR/trunk/r/CLINICAL_MONITORING_SYSTEM-QAM/QAMC16.m@ 623

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

initial load of WorldVistAEHR

File size: 3.2 KB
Line 
1QAMC16 ;HISC/DAD-CONDITION: REGISTRATION ;9/3/93 13:19
2 ;;1.0;Clinical Monitoring System;;09/13/1993
3EN1 ; *** CONDITION CODE
4 S STATUS(0)=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P1"))#2:^("P1"),1:"")
5 S BENEFIT(0)=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P2"))#2:^("P2"),1:"")
6 S CARE(0)=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P3"))#2:^("P3"),1:"")
7 S QAMDISP(0)=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P4"))#2:+^("P4"),1:0)
8 F QAMREGDT=(QAMTODAY-.0000001):0 S QAMREGDT=$O(^DPT("ADIS",QAMREGDT)) Q:(QAMREGDT'>0)!(QAMREGDT\1'?7N)!(QAMREGDT>(QAMTODAY+.9999999)) F QAMDFN=0:0 S QAMDFN=$O(^DPT("ADIS",QAMREGDT,QAMDFN)) Q:QAMDFN'>0 D LOOP1
9 K STATUS,BENEFIT,CARE,QAMREGDT,QAMDISP
10 Q
11LOOP1 S QAM=$S($D(^DPT(QAMDFN,"DIS",9999999-QAMREGDT,0))#2:^(0),1:""),STATUS=$P(QAM,"^",2),BENEFIT=$P(QAM,"^",3),CARE=$P(QAM,"^",11),QAMDISP=+$P(QAM,"^",7)
12 I STATUS(0)]"" Q:(STATUS="")!(STATUS(0)'[STATUS)
13 I BENEFIT(0)]"" Q:(BENEFIT="")!(BENEFIT(0)'[BENEFIT)
14 I CARE(0)]"" Q:(CARE="")!(CARE(0)'[CARE)
15 I QAMDISP(0) Q:$O(^QA(743.5,QAMDISP(0),"GRP","AB",QAMDISP,0))'>0
16 S ^UTILITY($J,"QAM CONDITION",QAMD1,QAMDFN)="",^(QAMDFN,QAMREGDT)=QAMDFN_"^"_(9999999-QAMREGDT)
17 Q
18EN2 ; *** PARAMETER CODE
19 K DIR S DIR(0)="LO^0:2^K:X[""."" X",DIR("A")="STATUS",DIR("B")=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P1"))#2:^("P1"),1:"") K:DIR("B")="" DIR("B")
20 S DIR("?",1)=" 0 10/10 VISIT",DIR("?",2)=" 1 UNSCHEDULED",DIR("?",3)=" 2 APPLICATION WITHOUT EXAM",DIR("?",4)="Choose any or all that you wish to monitor, e.g. 0,1 or 0-2, etc.",DIR("?")="Press RETURN for all status types."
21 S QAMPARAM="P1" D EN3^QAMUTL1 I $D(DIRUT) S Y=-1 G Y
22 S:Y]"" ^QA(743,QAMD0,"COND",QAMD1,"P1")=$S($E(Y,$L(Y))=",":$E(Y,1,$L(Y)-1),1:Y)
2321 K DIR S DIR(0)="LO^1:5^K:X[""."" X",DIR("A")="TYPE OF BENEFIT APPLIED FOR",DIR("B")=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P2"))#2:^("P2"),1:"") K:DIR("B")="" DIR("B")
24 S DIR("?",1)=" 1 HOSPITAL",DIR("?",2)=" 2 DOMICILIARY",DIR("?",3)=" 3 OUTPATIENT MEDICAL",DIR("?",4)=" 4 OUTPATIENT DENTAL",DIR("?",5)=" 5 NURSING HOME CARE"
25 S DIR("?",6)="Choose any or all that you wish to monitor, e.g. 1,3,5 or 2-4, etc.",DIR("?")="Press RETURN for all benefit types."
26 S QAMPARAM="P2" D EN3^QAMUTL1 I $D(DIRUT) S Y=-1 G Y
27 S:Y]"" ^QA(743,QAMD0,"COND",QAMD1,"P2")=$S($E(Y,$L(Y))=",":$E(Y,1,$L(Y)-1),1:Y)
2822 K DIR S DIR(0)="LO^1:5^K:X[""."" X",DIR("A")="TYPE OF CARE APPLIED FOR",DIR("B")=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P3"))#2:^("P3"),1:"") K:DIR("B")="" DIR("B")
29 S DIR("?",1)=" 1 DENTAL",DIR("?",2)=" 2 PLASTIC SURGERY",DIR("?",3)=" 3 STERILIZATION",DIR("?",4)=" 4 PREGNANCY",DIR("?",5)=" 5 ALL OTHER"
30 S DIR("?",6)="Choose any or all that you wish to monitor, e.g. 1,3,5 or 2-4, etc.",DIR("?")="Press RETURN for all care types."
31 S QAMPARAM="P3" D EN3^QAMUTL1 I $D(DIRUT) S Y=-1 G Y
32 S:Y]"" ^QA(743,QAMD0,"COND",QAMD1,"P3")=$S($E(Y,$L(Y))=",":$E(Y,1,$L(Y)-1),1:Y)
3323 K DIC,DIR,DIRUT S DIC=743.5,DIC(0)="EMNQZ",DIC("S")="I $P(^(0),""^"",2)=37",DIC("A")="DISPOSITION GROUP: ",DIC("B")=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P4"))#2:$P(^("P4"),"^",2),1:"") K:DIC("B")="" DIC("B")
34 S DIR("?",1)="Enter a GROUP name that contains MAS disposition types.",DIR("?")="press 'RETURN' for all disposition types."
35 S QAMPARAM="P4" D EN2^QAMUTL1 I $D(DIRUT) S Y=-1 G Y
36 S:Y]"" ^QA(743,QAMD0,"COND",QAMD1,"P4")=+Y_"^"_Y(0,0)
37EXIT K Y
38 K QAMPARAM
39Y Q
Note: See TracBrowser for help on using the repository browser.