source: WorldVistAEHR/trunk/r/CLINICAL_MONITORING_SYSTEM-QAM/QAMC15.m@ 1093

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

initial load of WorldVistAEHR

File size: 1.2 KB
Line 
1QAMC15 ;HISC/DAD-CONDITION: WARD TRANSFER ;7/27/92 13:04
2 ;;1.0;Clinical Monitoring System;;09/13/1993
3EN1 ; *** CONDITION CODE
4 S WARDGRP=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P1"))#2:+^("P1"),1:0)
5 F WARDDT=(QAMTODAY-.0000001):0 S WARDDT=$O(^DGPM("AMV2",WARDDT)) Q:(WARDDT'>0)!(WARDDT\1'?7N)!(WARDDT>(QAMTODAY+.9999999)) F QAMDFN=0:0 S QAMDFN=$O(^DGPM("AMV2",WARDDT,QAMDFN)) Q:QAMDFN'>0 D LOOP0
6 K WARDGRP,WARDDT,WARDD0,WARD,QAMDGPM
7 Q
8LOOP0 F WARDD0=0:0 S WARDD0=$O(^DGPM("AMV2",WARDDT,QAMDFN,WARDD0)) Q:WARDD0'>0 D LOOP1
9 Q
10LOOP1 S QAMDGPM=$G(^DGPM(WARDD0,0)) Q:$P(QAMDGPM,"^",18)'=4 ; INTERWARD XFR
11 I WARDGRP S WARD=+$P(QAMDGPM,"^",6) Q:$O(^QA(743.5,WARDGRP,"GRP","AB",WARD,0))'>0
12 S ^UTILITY($J,"QAM CONDITION",QAMD1,QAMDFN)="",^(QAMDFN,WARDDT)=WARDD0
13 Q
14EN2 ; *** PARAMETER CODE
15 K DIC,DIR,DIRUT S DIC=743.5,DIC(0)="EMNQZ",DIC("S")="I $P(^QA(743.5,+Y,0),""^"",2)=42"
16 S DIC("A")="WARD GROUP: ",DIC("B")=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P1"))#2:$P(^("P1"),"^",2),1:"") K:DIC("B")="" DIC("B")
17 S DIR("?",1)="Enter a GROUP name that contains MAS ward locations,",DIR("?")="or press 'RETURN' for all ward locations."
18 S QAMPARAM="P1" D EN2^QAMUTL1 I $D(DIRUT) S Y=-1 G Y
19 S:Y]"" ^QA(743,QAMD0,"COND",QAMD1,"P1")=+Y_"^"_Y(0,0)
20EXIT K Y
21 K QAMPARAM,QAMY
22Y Q
Note: See TracBrowser for help on using the repository browser.