Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IVM16PM

IVM16PM.m

Go to the documentation of this file.
  1. IVM16PM ;HEC/KSD; Manual functions to fix some problems during BETA; ; 5/17/02 1:43pm
  1. ;;2.0;INCOME VERIFICATION;**34**;
  1. ;
  1. COMPEND(QIEN) ;
  1. ; Complete Pending HL7 transmissions. In the process of completing
  1. ; the HL7 transmission the transmission will also be removed from the
  1. ; outgoing queue.
  1. ;
  1. ;Input
  1. ; QIEN = IEN OF THE LOGICAL LINK QUEUE
  1. ;
  1. W !
  1. S QIEN=$G(QIEN) Q:QIEN=""
  1. S F773="",CNT=0
  1. F S F773=$O(^HLMA("AC","O",QIEN,F773)) Q:F773="" D
  1. . S F773R1=$G(^HLMA(F773,"MSH",1,0))
  1. . Q:F773R1=""
  1. . S F772P1=+^HLMA(F773,0)
  1. . S F772R1=$G(^HL(772,F772P1,"IN",1,0))
  1. . I F772R1'="" D
  1. . . I ($P(F772R1,"^")="QRD")&($P(F772R1,"^",10)="OTH") D
  1. . . . S HLTCP=1
  1. . . . D STATUS^HLTF0(F773,3,,,1)
  1. . . . S CNT=CNT+1
  1. . . . S ^TMP($J,"ZZTEST2",F773)=""
  1. . . . S ^TMP($J,"ZZTEST2")=CNT
  1. . . . I '(CNT#100) W "."
  1. Q
  1. ;
  1. DGENDT ;
  1. ; Date/Time fields in ^DGEN(27.12) were getting filled with 1.
  1. ; Change to be $$NOW^XLFDT. Updating fields
  1. ; .02 DT/TM SENT
  1. ; .09 FIRST DT/TM
  1. S END=$P(^DGEN(27.12,0),"^",3),IEN=0
  1. F S IEN=$O(^DGEN(27.12,IEN)) Q:IEN=END D
  1. . S P01=$$GET1^DIQ(27.12,IEN,.01,"I")
  1. . I $$GET1^DIQ(27.12,IEN,.02,"I")=1 S DATA(.02)=$$NOW^XLFDT
  1. . I $$GET1^DIQ(27.12,IEN,.09,"I")=1 S DATA(.09)=$$NOW^XLFDT
  1. . I $D(DATA) D
  1. . . S DATA(.01)=P01
  1. . . S X=$$UPD^DGENDBS(27.12,IEN,.DATA)
  1. FIXQ ;
  1. S IEN=""
  1. S DT=$P($$NOW^XLFDT,".")
  1. F S IEN=$O(^DGEN(27.12,"ADS",1,IEN)) Q:IEN="" D
  1. . S ^DGEN(27.12,"ADS",DT,IEN)=""
  1. . K ^DGEN(27.12,"ADS",1,IEN)
  1. Q