source: WorldVistAEHR/trunk/r/CLINICAL_PROCEDURES-MD/MDHL7XXX.m@ 1714

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

initial load of WorldVistAEHR

File size: 1.8 KB
RevLine 
[613]1MDHL7XXX ; HOIFO/DP - Loopback device for CP ; 22-MAY-2003 13:37:41
2 ;;1.0;CLINICAL PROCEDURES;;Apr 01, 2004
3 ; IA# 10103 [Supported] Calls to XLFDT
4 ;
5EN ; [Procedure] Main entry point
6 ; wait 10 seconds and then produce some results in the CP RESULTS file
7 ; Variables STUDY and INST passed in via taskman
8 H 10 ; Wait for the study to update
9 N MDFDA,MDIEN,MDERR K ^TMP($J)
10 L +(^MDD(703.1,"B")):15 E Q
11 F D Q:'$D(^MDD(703.1,"B",X))
12 .S X="127001_"_(+$H)_$E($P($H,",",2)_"00000",1,5)
13 S MDFDA(703.1,"+1,",.01)=X
14 D UPDATE^DIE("","MDFDA","MDIEN","MDERR")
15 L -(^MDD(703.1,"B"))
16 S MDIEN=+$G(MDIEN(1),-1)_"," Q:+MDIEN<0
17 ; Proceed to build the report here using MDIEN in file 703.1
18 S MDFDA(703.1,MDIEN,.02)=$P(^MDD(702,STUDY,0),U,1)
19 S MDFDA(703.1,MDIEN,.03)=$$NOW^XLFDT()
20 S MDFDA(703.1,MDIEN,.04)=INST
21 D:+$$GET1^DIQ(702.09,INST_",",.13,"I") ; Bi-Directional?
22 .S MDFDA(703.1,MDIEN,.05)=STUDY
23 S MDFDA(703.11,"+2,"_MDIEN,.01)="1"
24 D UPDATE^DIE("","MDFDA","MDIEN","MDERR")
25 S MDIEN=+MDIEN(2)_","_MDIEN
26 S MDFDA(703.11,MDIEN,.2)=$NA(MDFDA(703.11,MDIEN,.2))
27 D GETS^DIQ(702,STUDY_",",".01;.011;.02;.03;.04;.05;.06;.07;.08;.09;.091;.1;.11;.12;.991","ENR",$NA(^TMP($J)))
28 S X="" F S X=$O(^TMP($J,702,STUDY_",",X)) Q:X="" D
29 .S Y=$O(MDFDA(703.11,MDIEN,.2,""),-1)+1
30 .S MDFDA(703.11,MDIEN,.2,Y)=X_": "_$G(^TMP($J,702,STUDY_",",X,"E"))
31 S MDFDA(703.1,$P(MDIEN,",",2,3),.09)="P"
32 D UPDATE^DIE("","MDFDA","MDIEN","MDERR")
33 K ^TMP($J)
34 Q
35 ;
36TEST ; Queue up the study creator
37 N DIC
38 S DIC=702,DIC(0)="AEQM",DIC("A")="Select Study to create a report for: "
39 D ^DIC Q:+Y<1
40 S STUDY=+Y,INST=+$P(^MDD(702,+Y,0),U,11)
41 D LOOPBACK(STUDY,INST)
42 Q
43 ;
44LOOPBACK(STUDY,INST) ; Queue up the Loopback process
45 N ZTSAVE,ZTRTN,ZTIO,ZTDESC,ZTDTH,ZTSK
46 S ZTSAVE("STUDY")=STUDY,ZTSAVE("INST")=INST
47 S ZTRTN="EN^MDHL7XXX"
48 S ZTIO=""
49 S ZTDESC="CP Loopback test"
50 S ZTDTH=$$NOW^XLFDT()
51 D ^%ZTLOAD
52 Q
53 ;
Note: See TracBrowser for help on using the repository browser.