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

BLRLNKU1.m

Go to the documentation of this file.
BLRLNKU1 ; IHS/HQT/MJL - IHS Laboratory PCC Visit Creation Utility ; 13-Oct-2017 14:04 ;  MKK
 ;;5.2;IHS LABORATORY;**1041**;NOV 01, 1997;Build 23
 ;
RESETLOI ; EP - Reset LOINC, if necessary
 NEW ARYLOINC,F60IEN,F60LOINC,IHSLOINC,TXNLOINC,SITESPEC,STR
 ;
 S ARYLOINC=+$TR($G(APCDALVR("APCDTLNC")),"`")     ; Array's LOINC
 ;
 S F60IEN=+$TR($G(APCDALVR("APCDTLAB")),"`")       ; File 60 IEN
 S SITESPEC=+$TR($G(APCDALVR("APCDTSTE")),"`")     ; Site/Specimen IEN
 S F60LOINC=+$$GET1^DIQ(60.01,SITESPEC_","_F60IEN,95.3,"I")  ; File 60 Site/Specimen LOINC
 I F60LOINC D:ARYLOINC'=F60LOINC FLOINC(F60LOINC)  Q
 ;
 S IHSLOINC=+$$GET1^DIQ(60,F60IEN,"IHS LOINC","I")      ; File 60 IHS LOINC
 I IHSLOINC D:ARYLOINC'=IHSLOINC FLOINC(IHSLOINC)  Q
 ;
 ; If no LOINC in file 60, clear APCDALVR array and file 9009022
 K APCDALVR("APCDTLNC")
 S FDA(9009022,BLRLOGDA_",",1310)="@"
 D UPDATE^DIE("S","FDA",,"ERRS")
 ; S TXNLOINC=+$$GET1^DIQ(9009022,BLRLOGDA,1310,"I")      ; File 9009022 LOINC
 ; I TXNLOINC D:ARYLOINC'=TXNLOINC FLOINC(TXNLOINC)
 ;
 Q
 ;
FLOINC(MAKEITSO) ; EP - Force APCDALVR("APCDTLNC") [LOINC] to a value & reset 9009022 LOINC
 NEW FDA,ERRS
 ;
 K APCDALVR("APCDTLNC")
 S APCDALVR("APCDTLNC")="`"_MAKEITSO
 S BLRLOINC=MAKEITSO
 ;
 S FDA(9009022,BLRLOGDA_",",1310)=MAKEITSO
 D UPDATE^DIE("S","FDA",,"ERRS")
 Q