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

VBECDCMP.m

Go to the documentation of this file.
  1. VBECDCMP ;hoifo/gjc-print mapped data from VBECS MAPPING TABLE (#6005);Nov 21, 2002
  1. ;;2.0;VBEC;;Jun 05, 2015;Build 4
  1. ;
  1. ;Medical Device #:
  1. ;Note: The food and Drug Administration classifies this software as a
  1. ;medical device. As such, it may not be changed in any way.
  1. ;Modifications to this software may result in an adulterated medical
  1. ;device under 21CFR820, the use of which is considered to be a
  1. ;violation of US Federal Statutes. Acquiring and implementing this
  1. ;software through the Freedom of Information Act requires the
  1. ;implementer to assume total responsibility for the software, and
  1. ;become a registered manufacturer of a medical device, subject to FDA
  1. ;regulations.
  1. ;
  1. ;Call to $$NEWERR^%ZTER is supported by IA: 1621
  1. ;Call to $$S^%ZTLOAD is supported by IA: 10063
  1. ;Call to $$EXTERNAL^DILFD is supported by IA: 2055
  1. ;Call to ^DIR is supported by IA: 10026
  1. ;Call to $$DT^XLFDT is supported by IA: 10103
  1. ;Call to $$FMTE^XLFDT is supported by IA: 10103
  1. ;Call to $$CJ^XLFSTR is supported by IA: 10104
  1. ;Call to EN^XUTMDEVQ is supported by IA: 1519
  1. ;Execution of ^%ZOSF("TEST") is supported by IA: 10096
  1. ;
  1. EN ; entry point for data mapping report. this is an evocable entry point
  1. ; for the option: VBEC PRINT SQL/VISTA MAPPINGS.
  1. ;
  1. I $S($D(DUZ)[0:1,$D(DUZ(0))[0:1,'DUZ:1,DUZ=.5:1,1:0) W !!?3,$C(7),"DUZ & DUZ(0) must be defined to an active user (not POSTMASTER) in order to",!?3,"proceed." Q
  1. ;
  1. ; initialize the error trap
  1. I $$NEWERR^%ZTER N $ETRAP,$ESTACK S $ETRAP="D ERR^VBECDCU1"
  1. E S X="D ERR^VBECDCU1",@^%ZOSF("TRAP")
  1. ;
  1. RPT6005 ; Select the mapped VistA attribute you wish to examine.
  1. K DIR S DIR(0)="S^AA:Antigen/Antibody;TR:Transfusion Reaction",DIR("A")="Select mapped data attribute to display"
  1. S DIR("?",1)="Enter 'AA' for Antibodies and Antigens (Vista File: Function Field #61.3)"
  1. S DIR("?",2)="Enter 'TR' for Transfusion Reaction (VistA File: Blood Bank Utility"
  1. S DIR("?")="#65.4)" D ^DIR
  1. I $D(DIRUT) D EXIT Q
  1. S VBECFILE=$S(Y="AA":61.3,1:65.4),VBECATT=Y(0)
  1. ;
  1. ; check to see that data exists in the VBECS MAPPING TABLE (#6005)
  1. ; file for the attribute selected.
  1. I $O(^VBEC(6005,"B",$S(VBECFILE'=66.01:VBECFILE_"-",1:VBECFILE)))="" D Q
  1. .W !!,"There is no "_VBECATT_" data in the VBECS MAPPING TABLE (#6005)"
  1. .W !,"file to be printed.",$C(7)
  1. .Q
  1. ;
  1. S VBECR="GO6005^VBECDCMP"
  1. F I="DUZ","VBECFILE","VBECATT" S VBECS(I)=""
  1. K I S VBECD="VBECS display current data mapping relationships"
  1. S VBECZ="MQ" D EN^XUTMDEVQ(VBECR,VBECD,.VBECS,,1)
  1. I +$G(ZTSK)>0 W !!,"Task Number: "_ZTSK,!
  1. ;
  1. EXIT ;clean up the symbol table; exit the utility
  1. K DIR,DIROUT,DIRUT,DTOUT,DUOUT,POP,VBECATT,VBECFIEN,VBECIEN,VBECD,VBECFILE,VBECR,VBECS,VBECY,VBECZ,X,Y,ZTSK
  1. Q
  1. ;
  1. GO6005 ; print mapping data information from the VBECS MAPPING TABLE (#6005)
  1. ; file.
  1. Q:'$G(VBECFILE) S:$D(ZTQUEUED) ZTREQ="@"
  1. ;
  1. S PAGE=1,$P(LINE,"-",(IOM+1))="",TODAY=$$FMTE^XLFDT($$DT^XLFDT(),"1P")
  1. S (VBECXIT,VBECSTOP)=0,VBECGUID="" D HDR
  1. F S VBECGUID=$O(^VBEC(6005,"AB",VBECFILE,VBECGUID)) Q:VBECGUID="" D Q:VBECXIT!(VBECSTOP)
  1. .S VBECIEN=0
  1. .F S VBECIEN=$O(^VBEC(6005,"AB",VBECFILE,VBECGUID,VBECIEN)) Q:'VBECIEN D Q:VBECXIT!(VBECSTOP)
  1. ..S VBECY(0)=$G(^VBEC(6005,VBECIEN,0))
  1. ..S VBECFIEN=$P(VBECY(0),U),VBECNAME=$P(VBECY(0),U,2)
  1. ..S VBECNME=$P($G(^VBEC(6007,VBECGUID,0)),U)
  1. ..S VBECANTI=$$EXTERNAL^DILFD(6005,.04,,$P(VBECY(0),U,4))
  1. ..I $$S^%ZTLOAD() S (ZTSTOP,VBECSTOP)=1 Q
  1. ..W !!,"VistA FileMan File: "_$P(VBECFIEN,"-")
  1. ..W:$P(VBECFIEN,"-",2) !,"VistA FileMan IEN: "_$P(VBECFIEN,"-",2)
  1. ..W !,"Standard Record Name: "_VBECNME
  1. ..I $Y>(IOSL-4) D EOS Q:VBECXIT
  1. ..W !,"VistA Record Name : "_VBECNAME
  1. ..W:VBECANTI'="" !,"Antigen/Antibody : "_VBECANTI
  1. ..I $Y>(IOSL-4) D EOS
  1. ..Q
  1. .Q
  1. W:$G(VBECFIEN)="" !,$$CJ^XLFSTR("*** No Records To Print ***",IOM)
  1. ;
  1. K LINE,PAGE,POP,TODAY,VBEC01,VBECANTI,VBECIEN,VBECGUID,VBECNAME,VBECNME,VBECXIT,VBECSTOP
  1. Q
  1. ;
  1. EOS ; end of screen (eos) check & refresh screen action
  1. ; check to see if additional data exist to print, if not exit w/o
  1. ; issuing the eos prompt.
  1. ;
  1. I $E(IOST)="C" K DIR S DIR(0)="E" D ^DIR S VBECXIT=$S(Y'>0:1,1:0)
  1. K DIR,X,Y Q:VBECXIT
  1. HDR ; draw header
  1. W:($E(IOST)="C")!(PAGE>1) @IOF
  1. W !,$$CJ^XLFSTR("VistA Data Mapped To Standard SQL Server Attributes",IOM)
  1. W !,"Date: ",TODAY,?69,"Page: ",PAGE,!,LINE
  1. S PAGE=PAGE+1,HEADER="Attribute being mapped: "_VBECATT
  1. W !,$$CJ^XLFSTR(HEADER,IOM) K HEADER
  1. Q
  1. ;