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

GMRVP514.m

Go to the documentation of this file.
GMRVP514 ;BAY/KAM-Patch GMRV*5*14 Install Utility Routine ;8/29/05 3:24pm
 ;;5.0;GEN. MED. REC. - VITALS;**14**;Oct 31, 2002
 ;
PREINIT ; Remove a Data Dictionary Field
 N VIEN,USED,VTIEN,X1,X2
 K ^XTMP("GMRVP514")
 I '$G(DT) S DT=$$DT^XLFDT
 I '$D(^XTMP("GMRVP514")) S X1=DT,X2=+90 D C^%DTC S ^XTMP("GMRVP514",0)=$G(X)_"^"_DT
 S (VIEN,USED)=0
 F  S VIEN=$O(^GMRD(120.51,VIEN)) Q:VIEN'?1.N!(USED=1)  D
 .  I $P(^GMRD(120.51,VIEN,0),"^",7)?1.N S USED=1
 I USED D  Q
 . W !,"^GMRD(120.51,"_VIEN_",0) CONTAINS A NUMERIC"
 ; delete the field "ORDERABLE"
 I $D(^DD(120.51,"B","ORDERABLE")) D
 . S VTIEN=$O(^DD(120.51,"B","ORDERABLE",""))
 . S ^XTMP("GMRVP514",$J,120.51,VTIEN)="^DD(120.51,"_VTIEN_" HAS BEEN DELETED" ; Deletion
 . K DIK S DA=VTIEN,DA(1)=120.51,DIK="^DD(120.51," D ^DIK K DIK,DA
 Q