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

HMPDJ02A.m

Go to the documentation of this file.
  1. HMPDJ02A ;ASMR/MKB/JD,CK,CPC,PB - Problems,Allergies,Vitals ;Jan 17, 2107 09:56:26
  1. ;;2.0;ENTERPRISE HEALTH MANAGEMENT PLATFORM;**3**;Jan 17, 2017;Build 15
  1. ;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. ; External References DBIA#
  1. ; ------------------- -----
  1. ; ^AUPNVSIT( 2028
  1. ;
  1. Q
  1. GETVIEN(DFNN,VISITDT) ;JL; get the Visit IEN from VISIT file based on patient ID and Datetime
  1. Q:'+$G(DFNN)!'$L(VISITDT) -1 ;return -1 if bad parameter
  1. N REVDT,VISITIEN
  1. S REVDT=9999999-$P(VISITDT,".",1)_$S($P(VISITDT,".",2)'="":"."_$P(VISITDT,".",2),1:"")
  1. S VISITIEN=$O(^AUPNVSIT("AA",DFNN,REVDT,"")) ; using "AA" cross-reference
  1. Q:VISITIEN="" -1
  1. Q VISITIEN
  1. ;
  1. VSTIEN(VSTIEN) ; Jan 17, 2017 - PB - DE6877 - Function to check for the visit and the patient to exist for the visit in the Visit File
  1. ; INPUT - VSTIEN the IEN for the visit in the Visit File
  1. ; OUTPUT - 1 = missing required data element, 0 = required data elements are present
  1. N VSTDATA
  1. S VSTDATA=$G(^AUPNVSIT(VSTIEN,0)) ;ICR 2028
  1. Q:$P(VSTDATA,U)="" 1 ; if the .01 field is null quit and return 1
  1. Q:$P(VSTDATA,U,5)="" 1 ; if field .05 is null quit and return 1
  1. Q 0