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

BTPW12PS.m

Go to the documentation of this file.
BTPW12PS ;GDHD/HCS/ALA-CMET V 1.2 Postinsall ; 03 Feb 2017  12:02 PM
 ;;1.2;CARE MANAGEMENT EVENT TRACKING;;Jul 07, 2017;Build 71
 ;
EN ;EP - Postinstall
 ; Update pointers IN CMET
 NEW PRCN,TXN,TTYP,VAL,BTPWUPD
 S PRCN=0
 F  S PRCN=$O(^BTPW(90621,PRCN)) Q:'PRCN  D
 . S BTPWUPD(90621,PRCN_",",.13)="@",BTPWUPD(90621,PRCN_",",.14)="@"
 . S TXN=0
 . F  S TXN=$O(^BTPW(90621,PRCN,1,TXN)) Q:'TXN  D
 .. S TTYP=$P(^BTPW(90621,PRCN,1,TXN,0),U,3),TAX=$P(^(0),U,1)
 .. I TTYP=3 D
 ... I $P(^BTPW(90621,PRCN,1,TXN,0),"^",5)'="" D
 .... NEW IENS,DA
 .... S DA(1)=PRCN,DA=TXN,IENS=$$IENS^DILF(.DA)
 .... S BTPWUPD(90621.01,IENS,.05)="@",BTPWUPD(90621.01,IENS,.06)="@"
 .. S TTYP=$S(TTYP=3:"L",1:"N")
 .. S VAL=$$STXPT(TAX,TTYP)
 .. NEW DA,IENS
 .. S DA(1)=PRCN,DA=TXN,IENS=$$IENS^DILF(.DA)
 .. S BTPWUPD(90621.01,IENS,.02)=VAL
 D FILE^DIE("","BTPWUPD","ERROR")
 Q
 ;
STXPT(TXNM,TYP) ;  Set taxonomy pointer
 ;Input
 ;  TXNM - Taxonomy name
 ;  TYP  - Taxonomy Type (L = LAB, N = Non Lab)
 NEW IEN,SIEN,DA,IENS,BQUPD,VALUE,GLB
 S VALUE=""
 I TYP="L" D
 . S IEN=$O(^ATXLAB("B",TXNM,"")),GLB="ATXLAB("
 . I IEN="" S TYP="N"
 I TYP="N" S IEN=$O(^ATXAX("B",TXNM,"")),GLB="ATXAX("
 I IEN="" S VALUE="@"
 I IEN'="" S VALUE=IEN_";"_GLB
 Q VALUE