source: FOIAVistA/trunk/r/INCOME_VERIFICATION_MATCH-IVM/IVM16PM.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1IVM16PM ;HEC/KSD; Manual functions to fix some problems during BETA; ; 5/17/02 1:43pm
2 ;;2.0;INCOME VERIFICATION;**34**;
3 ;
4COMPEND(QIEN) ;
5 ; Complete Pending HL7 transmissions. In the process of completing
6 ; the HL7 transmission the transmission will also be removed from the
7 ; outgoing queue.
8 ;
9 ;Input
10 ; QIEN = IEN OF THE LOGICAL LINK QUEUE
11 ;
12 W !
13 S QIEN=$G(QIEN) Q:QIEN=""
14 S F773="",CNT=0
15 F S F773=$O(^HLMA("AC","O",QIEN,F773)) Q:F773="" D
16 . S F773R1=$G(^HLMA(F773,"MSH",1,0))
17 . Q:F773R1=""
18 . S F772P1=+^HLMA(F773,0)
19 . S F772R1=$G(^HL(772,F772P1,"IN",1,0))
20 . I F772R1'="" D
21 . . I ($P(F772R1,"^")="QRD")&($P(F772R1,"^",10)="OTH") D
22 . . . S HLTCP=1
23 . . . D STATUS^HLTF0(F773,3,,,1)
24 . . . S CNT=CNT+1
25 . . . S ^TMP($J,"ZZTEST2",F773)=""
26 . . . S ^TMP($J,"ZZTEST2")=CNT
27 . . . I '(CNT#100) W "."
28 Q
29 ;
30DGENDT ;
31 ; Date/Time fields in ^DGEN(27.12) were getting filled with 1.
32 ; Change to be $$NOW^XLFDT. Updating fields
33 ; .02 DT/TM SENT
34 ; .09 FIRST DT/TM
35 S END=$P(^DGEN(27.12,0),"^",3),IEN=0
36 F S IEN=$O(^DGEN(27.12,IEN)) Q:IEN=END D
37 . S P01=$$GET1^DIQ(27.12,IEN,.01,"I")
38 . I $$GET1^DIQ(27.12,IEN,.02,"I")=1 S DATA(.02)=$$NOW^XLFDT
39 . I $$GET1^DIQ(27.12,IEN,.09,"I")=1 S DATA(.09)=$$NOW^XLFDT
40 . I $D(DATA) D
41 . . S DATA(.01)=P01
42 . . S X=$$UPD^DGENDBS(27.12,IEN,.DATA)
43FIXQ ;
44 S IEN=""
45 S DT=$P($$NOW^XLFDT,".")
46 F S IEN=$O(^DGEN(27.12,"ADS",1,IEN)) Q:IEN="" D
47 . S ^DGEN(27.12,"ADS",DT,IEN)=""
48 . K ^DGEN(27.12,"ADS",1,IEN)
49 Q
Note: See TracBrowser for help on using the repository browser.