source: FOIAVistA/trunk/r/CLINICAL_MONITORING_SYSTEM-QAM/QAMC5.m@ 940

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1QAMC5 ;HISC/DAD-CONDITION: MAS MOVEMENT TYPE GROUP ;9/3/93 13:21
2 ;;1.0;Clinical Monitoring System;;09/13/1993
3EN1 ; *** CONDITION CODE
4 S QAMTRANS=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P1"))#2:+^("P1"),1:0)
5 Q:(QAMTRANS<1)!(QAMTRANS>7) S QAMXREF="AMV"_QAMTRANS
6 S QAMGRPD0=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P2"))#2:+^("P2"),1:0)
7 F QAMOVEDT=(QAMTODAY-.0000001):0 S QAMOVEDT=$O(^DGPM(QAMXREF,QAMOVEDT)) Q:QAMOVEDT'>0!(QAMOVEDT>(QAMTODAY+.9999999))!(QAMOVEDT\1'?7N) F QAMDFN=0:0 S QAMDFN=$O(^DGPM(QAMXREF,QAMOVEDT,QAMDFN)) Q:QAMDFN'>0 D LOOP1
8 K QAMTRANS,QAMGRPD0,QAMOVEDT,QAMOVED0,QAMXREF,QAMOVETY
9 Q
10LOOP1 F QAMOVED0=0:0 S QAMOVED0=$O(^DGPM(QAMXREF,QAMOVEDT,QAMDFN,QAMOVED0)) Q:QAMOVED0'>0 D LOOP2
11 Q
12LOOP2 I QAMGRPD0 S QAMOVETY=+$S($D(^DGPM(QAMOVED0,0))#2:$P(^(0),"^",18),1:0) Q:$O(^QA(743.5,QAMGRPD0,"GRP","AB",QAMOVETY,0))'>0
13 S ^UTILITY($J,"QAM CONDITION",QAMD1,QAMDFN)="",^(QAMDFN,QAMOVEDT)=QAMOVED0
14 Q
15EN2 ; *** PARAMETER CODE
16 K DIR,DIRUT S DIR(0)="POA^405.3:AEMNQZ",DIR("A")="MAS MOVEMENT TRANSACTION TYPE: ",DIR("B")=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P1"))#2:$P(^("P1"),"^",2),1:"") K:DIR("B")="" DIR("B")
17 S DIR("?")="Enter the MAS transaction type of interest."
18 S QAMPARAM="P1" D EN3^QAMUTL1 I $D(DIRUT) S Y=-1 G Y
19 S:Y]"" ^QA(743,QAMD0,"COND",QAMD1,"P1")=+Y_"^"_Y(0,0),QAMY(0,0)=Y(0,0)
20 I $D(^QA(743,QAMD0,"COND",QAMD1,"P1"))[0 K ^QA(743,QAMD0,"COND",QAMD1,"P2") S Y=-1 G Y
212 K DIC,DIR,DIRUT S DIC=743.5,DIC(0)="EMNQZ",DIC("S")="I $P(^QA(743.5,+Y,0),""^"",2)=405.2"
22 S DIC("A")=QAMY(0,0)_" TYPE GROUP: ",DIC("B")=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P2"))#2:$P(^("P2"),"^",2),1:"") K:DIC("B")="" DIC("B")
23 S DIR("?",1)="Enter a GROUP name that contains MAS "_QAMY(0,0)_" movement types",DIR("?",2)="Enter a MAS "_QAMY(0,0)_" movement type GROUP, or",DIR("?")="press 'RETURN' for all "_QAMY(0,0)_" types."
24 S QAMPARAM="P2" D EN2^QAMUTL1 I $D(DIRUT) S Y=-1 G Y
25 S:Y]"" ^QA(743,QAMD0,"COND",QAMD1,"P2")=+Y_"^"_Y(0,0)
26EXIT K Y
27 K QAMPARAM,QAMY
28Y Q
Note: See TracBrowser for help on using the repository browser.