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

PXVPST01.m

Go to the documentation of this file.
  1. PXVPST01 ;BIR/CML3 - V IMMUNIZATION FILE CONVERSION ; 26 Sep 2014 9:38 AM
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**201**;Aug 12, 1996;Build 41
  1. ;
  1. MVDIAGS ;
  1. ; moves the data in the previous DIAGNOSIS fields to the new fields:
  1. ; the PRIMARY DIAGNOSIS (#1304) and the OTHER DIAGNOSIS (#3) multiple
  1. ; this is a one-time task
  1. ; ^AUPNVIMM( is the V IMMUNIZATION file (#9000010.11)
  1. ; PXVV is the IENs of that file
  1. ; PXVD are pieces 8-15 of the zero node, where the data for the
  1. ; previous diagnosis fields (#s .08 thru .15) is stored
  1. N %,%H,%I,CNT,DA,DIC,DIE,DIK,DR,Q,X,Y,PXVD,PXVNOW,PXVV
  1. D NOW^%DTC S Y=% D DD^%DT S PXVNOW=Y
  1. D BMES^XPDUTL("Moving the DIAGNOSIS data of the V IMMUNIZATION file to the global locations of the new fields (in the same file). Process started "_PXVNOW)
  1. S (CNT,PXVV)=0
  1. F S PXVV=$O(^AUPNVIMM(PXVV)) Q:'PXVV S PXVD=$P($G(^(PXVV,0)),"^",8,15) I PXVD'="",PXVD'?1.7"^" D ;
  1. . ; DIAGNOSIS becomes PRIMARY DIAGNOSIS
  1. . S CNT=CNT+1,X=$P(PXVD,"^")
  1. . I X'="" K DA S DIE="^AUPNVIMM(",DA=PXVV,DR="1304////"_X D ^DIE S $P(^AUPNVIMM(PXVV,0),"^",8)=""
  1. . ; DIAGNOSES 2-8 become entries in the OTHER DIAGNOSIS multiple
  1. . F Q=2:1:8 S X=$P(PXVD,"^",Q) I X'="" D ;
  1. .. K DA,DIC S DIC="^AUPNVIMM("_PXVV_",3,",DIC(0)="L",DA(1)=PXVV
  1. .. D FILE^DICN S $P(^AUPNVIMM(PXVV,0),"^",Q+7)=""
  1. ;
  1. MVDONE ; DIAGNOSIS data move completed
  1. D NOW^%DTC S Y=% D DD^%DT S PXVNOW=Y
  1. K Q S Q(1)=" ",Q(3)=" "_CNT_" entr"_$S(CNT'=1:"ies",1:"y")_" processed."
  1. S Q(2)=" Process moving DIAGNOSIS data within the V IMMUNIZATION file completed at "_PXVNOW
  1. D BMES^XPDUTL(.Q)
  1. ;
  1. RMVFLD ;
  1. ; following code no longer needed . . .
  1. ; I $P($G(^DD(9000010.11,.1,0)),"^")="DIAGNOSIS 3" K DA S DIK="^DD(9000010.11,",DA=.1,DA(1)=9000010.11 D ^DIK
  1. Q