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

APCDEFC1.m

Go to the documentation of this file.
  1. APCDEFC1 ; IHS/CMI/LAB - APCD Auto Print PCC Encounter Form Compute ;
  1. ;;2.0;IHS PCC SUITE;;MAY 14, 2009
  1. ;
  1. ;This routine will compute the automated PCC encounter form for
  1. ;a particular visit. The visit IEN needs to be passed in for it
  1. ;to run. This will typically be called after data entry.
  1. ;
  1. ;
  1. VDXP ;EP-- v diagnostic procedure result to external
  1. S APCDDXP=$$VAL^XBDIQ1(9999999.68,$P(APCDTREC,U),.01)
  1. S APCDV=$P(APCDTREC,U,4)
  1. S APCDDXP(APCDDXP)=APCDV
  1. Q
  1. ;
  1. VRAD ;EP-- v radiology to external
  1. S APCDRAD=$$VAL^XBDIQ1(71,$P(APCDTREC,U),.01)
  1. S APCDABN=$P(APCDTREC,U,5)
  1. S APCDRAD(APCDRAD)=APCDABN
  1. Q
  1. ;
  1. VHF ;EP-- v health factors to external
  1. S APCDHF=$$VAL^XBDIQ1(9999999.64,$P(APCDTREC,U),.01)
  1. S APCDLS=$S($P(APCDTREC,U,4):$$EXTSET^XBFUNC(9000010.23,.04,$P(APCDTREC,U,4)),1:"")
  1. S APCDHF(APCDHF)=APCDLS
  1. Q
  1. ;
  1. VMIC ;EP-- v microbiology to external
  1. S APCDMIC=$$VAL^XBDIQ1(60,$P(APCDTREC,U),.01)
  1. S APCDORG=$S($P(APCDTREC,U,4):$$VAL^XBDIQ1(61.2,$P(APCDTREC,U,4),.01),1:"")
  1. S APCDMIC(APCDMIC)=APCDORG
  1. Q
  1. ;
  1. VBB ;EP-- v blood bank to external
  1. S APCDBB=$$VAL^XBDIQ1(60,$P(APCDTREC,U),.01)
  1. S APCDRES=$P(APCDTREC,U,4)
  1. S APCDAB=$S($P(APCDTREC,U,5):$$VAL^XBDIQ1(61.3,$P(APCDTREC,U,5),.01),1:"")
  1. S APCDBB(APCDBB)=APCDRES_U_APCDAB
  1. Q
  1. ;
  1. VPHN ;EP-- v public health nurse to external
  1. S APCDTVDF=$G(APCDTREC)
  1. S APCDREC0=$G(^AUPNVPHN(APCDTVDF,0))
  1. S APCDREC1=$G(^AUPNVPHN(APCDTVDF,21))
  1. S APCDREC2=$G(^AUPNVPHN(APCDTVDF,22))
  1. S APCDREC3=$G(^AUPNVPHN(APCDTVDF,23))
  1. S APCDREC4=$G(^AUPNVPHN(APCDTVDF,24))
  1. S APCDPHN=$P(APCDREC0,U)
  1. S APCDRES=$S($P(APCDREC0,U,4):$$EXTSET^XBFUNC(9000010.32,.04,$P(APCDREC0,U,4)),1:"")
  1. S APCDLOI=$S($P(APCDREC0,U,5):$$EXTSET^XBFUNC(9000010.32,.05,$P(APCDREC0,U,5)),1:"")
  1. S APCDTOD=$S($P(APCDREC0,U,6):$$EXTSET^XBFUNC(9000010.32,.06,$P(APCDREC0,U,6)),1:"")
  1. S APCDPHN(APCDPHN)=APCDRES_U_APCDLOI_U_APCDTOD_U_APCDREC1_U_APCDREC2
  1. S APCDPHN(APCDPHN)=APCDPHN(APCDPHN)_U_APCDREC3_U_APCDREC4
  1. Q
  1. ;
  1. VNT ;EP-- v narrative text to external
  1. S APCDTVDF=$G(APCDTREC)
  1. S APCDREC0=$G(^AUPNVNT(APCDTVDF,0))
  1. S APCDNT=$$VAL^XBDIQ1(9999999.89,$P(APCDREC0,U),.01)
  1. Q:'$D(^AUPNVNT(APCDTVDF,11,0))
  1. K ^UTILITY($J,"W")
  1. S APCDNDA=0 F S APCDNDA=$O(^AUPNVNT(APCDTVDF,11,APCDNDA)) Q:'APCDNDA D
  1. . S X=$G(^AUPNVNT(APCDTVDF,11,APCDNDA,0))
  1. . S DIWL=0,DIWR=80
  1. . D ^DIWP
  1. S APCDUDA="" F S APCDUDA=$O(^UTILITY($J,"W",APCDUDA)) Q:APCDUDA="" D
  1. . S APCDVDA=0 F S APCDVDA=$O(^UTILITY($J,"W",APCDUDA,APCDVDA)) Q:'APCDVDA!(APCDUDA="") D
  1. .. S APCDNT(APCDNT,APCDVDA)=$G(^UTILITY($J,"W",APCDUDA,APCDVDA,0))
  1. Q
  1. ;
  1. VIF ;EP -- infant feeding choice
  1. S APCDTVDF=$G(APCDTREC)
  1. S APCDINF=$$EXTSET^XBFUNC(9000010.44,.01,$P(APCDTREC,U,1))
  1. S APCDINF(APCDINF)=""
  1. Q