source: WorldVistAEHR/trunk/r/CLINICAL_MONITORING_SYSTEM-QAM/QAMC22.m@ 1608

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

initial load of WorldVistAEHR

File size: 2.0 KB
Line 
1QAMC22 ;HISC/DAD-CONDITION: PTF ICD DIAGNOSIS & PROCEDURE ;7/23/93 10:16
2 ;;1.0;Clinical Monitoring System;;09/13/1993
3EN1 ; *** CONDITION CODE
4 S ICDDIAG=+$G(^QA(743,QAMD0,"COND",QAMD1,"P1"))
5 S ICDPROC=+$G(^QA(743,QAMD0,"COND",QAMD1,"P2"))
6 F QAMPTFDT=(QAMTODAY-.0000001):0 S QAMPTFDT=$O(^DGP(45.84,"AC",QAMPTFDT)) Q:(QAMPTFDT'>0)!(QAMPTFDT>(QAMTODAY+.9999999))!(QAMPTFDT\1'?7N) F QAMPTFD0=0:0 S QAMPTFD0=$O(^DGP(45.84,"AC",QAMPTFDT,QAMPTFD0)) Q:QAMPTFD0'>0 D LOOP
7 K ICDDIAG,ICDPROC,OPCODE,PTFDATE,QAMPTF70,QAMPTFD0,QAMPTFD1,QAMPTFDT
8 Q
9LOOP Q:$D(^DGPT(QAMPTFD0,0))[0 S X=^(0),QAMDFN=+X,PTFDATE=$P(X,"^",2),ICDDIAG(0)=0
10DIAG S QAMPTF70=$G(^DGPT(QAMPTFD0,70)) F QA=10,16:1:24 S X=+$P(QAMPTF70,"^",QA) I $O(^QA(743.5,ICDDIAG,"GRP","AB",X,0)) S ICDDIAG(0)=1 Q
11 S:ICDDIAG'>0 ICDDIAG(0)=1 Q:ICDDIAG(0)'>0 I ICDPROC'>0 D FALLOUT Q
12PROC F QAMPTFD1=0:0 S QAMPTFD1=$O(^DGPT(QAMPTFD0,"S",QAMPTFD1)) Q:QAMPTFD1'>0 S X=^(QAMPTFD1,0),PTFDATE=+X F QA=8:1:12 S OPCODE=+$P(X,"^",QA) I $O(^QA(743.5,ICDPROC,"GRP","AB",OPCODE,0)) D FALLOUT Q
13 Q
14FALLOUT S ^UTILITY($J,"QAM CONDITION",QAMD1,QAMDFN)="",^(QAMDFN,PTFDATE)=QAMPTFD0
15 Q
16EN2 ; *** PARAMETER CODE
1721 K DIC,DIR,DIRUT S DIC=743.5,DIC(0)="EMNQZ",DIC("S")="I $P(^(0),""^"",2)=80",DIC("A")="ICD DIAGNOSIS GROUP: ",DIC("B")=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P1"))#2:$P(^("P1"),"^",2),1:"") K:DIC("B")="" DIC("B")
18 S DIR("?",1)="Enter a GROUP name that contains ICD diagnoses.",DIR("?")="press 'RETURN' for all ICD diagnoses."
19 S QAMPARAM="P1" D EN2^QAMUTL1 I $D(DIRUT) S Y=-1 G Y
20 S:Y]"" ^QA(743,QAMD0,"COND",QAMD1,"P1")=+Y_"^"_Y(0,0)
2122 K DIC,DIR,DIRUT S DIC=743.5,DIC(0)="EMNQZ",DIC("S")="I $P(^(0),""^"",2)=80.1",DIC("A")="ICD PROCEDURE GROUP: ",DIC("B")=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P2"))#2:$P(^("P2"),"^",2),1:"") K:DIC("B")="" DIC("B")
22 S DIR("?",1)="Enter a GROUP name that contains ICD procedures.",DIR("?")="press 'RETURN' for all ICD procedures."
23 S QAMPARAM="P2" D EN2^QAMUTL1 I $D(DIRUT) S Y=-1 G Y
24 S:Y]"" ^QA(743,QAMD0,"COND",QAMD1,"P2")=+Y_"^"_Y(0,0)
25EXIT K Y
26 K QAMPARAM
27Y Q
Note: See TracBrowser for help on using the repository browser.