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

BQIUL3.m

Go to the documentation of this file.
BQIUL3 ;APTIV/HC/DB-BQI utilities for Code Set Versioning ; 16 Apr 2008  6:00 PM
 ;;2.5;ICARE MANAGEMENT SYSTEM;**2**;May 24, 2016;Build 14
 ;
ICD9(VAL,IDT,PC) ; EP - Return value of CSV pc of the ICD DIAGNOSIS file (#80)
 ;
 ;Input Parameter Description:
 ;VAL   ICD DIAGNOSIS internal entry number
 ;IDT   ICD DIAGNOSIS date
 ;PC    piece of the string returned by $$ICDDX^ICDCODE that is being
 ;      requested
 N STR
 S IDT=$G(IDT)
 I $$VERSION^XPDUTL("AICD")>3.51 D
 . S SYS=$$CSI^ICDEX(80,VAL)
 . S STR=$$ICDDX^ICDEX(VAL,IDT,SYS,"I")
 I $$VERSION^XPDUTL("AICD")<4.0 D
 . S STR=$S(IDT="":$$ICDDX^ICDCODE(VAL),1:$$ICDDX^ICDCODE(VAL,IDT))
 I $P(STR,U)=-1 Q ""
 Q $P(STR,U,PC)
 ;
ICD0(VAL,IDT,PC) ; EP - Return value of CSV pc of the ICD OPERATION/PROCEDURE file (#80.1)
 ;
 ;Input Parameter Description:
 ;VAL   ICD OPERATION/PROCEDURE internal entry number
 ;IDT   ICD OPERATION/PROCEDURE date
 ;PC    piece of the string returned by $$ICDOP^ICDCODE that is being
 ;      requested
 N STR
 S IDT=$G(IDT)
 I $$VERSION^XPDUTL("AICD")>3.51 D
 . S SYS=$$CSI^ICDEX(80.1,VAL)
 . S STR=$$ICDOP^ICDEX(VAL,IDT,SYS,"I")
 I $$VERSION^XPDUTL("AICD")<4.0 D
 . S STR=$S(IDT="":$$ICDOP^ICDCODE(VAL),1:$$ICDOP^ICDCODE(VAL,IDT))
 I $P(STR,U)=-1 Q ""
 Q $P(STR,U,PC)
 ;
ICPT(VAL,IDT,PC) ; EP - Return value of CSV pc of the CPT file (#81)
 ;
 ;Input Parameter Description:
 ;VAL   CPT internal entry number
 ;IDT   CPT date
 ;PC    piece of the string returned by $$CPT^ICPTCOD that is being
 ;      requested
 N STR
 S IDT=$G(IDT)
 S STR=$S(IDT="":$$CPT^ICPTCOD(VAL),1:$$CPT^ICPTCOD(VAL,IDT))
 I $P(STR,U)=-1 Q ""
 Q $P(STR,U,PC)
 ;
ICDD(FILE,VAL,IDT) ;EP - Return description for ^ICD9 or ^ICD0
 ; FILE is 80 or 80.1
 ; VAL is internal entry number
 ; IDT is the date
 ;
 N EXEC,CODE,OK,ARRAY,DESC,I,QFL,CSYS
 S IDT=$G(IDT,""),QFL=0
 I $$VERSION^XPDUTL("AICD")<4.0 D   I QFL Q ""
 . S EXEC="S CODE=$$"_FILE_"("_VAL_","_IDT_",2)"
 . X EXEC
 . I CODE="" S QFL=1 Q
 . S OK=$$ICDD^ICDCODE(CODE,"ARRAY",IDT)
 . I OK=-1 S QFL=1
 I $$VERSION^XPDUTL("AICD")>3.51 D  I OK=-1 Q ""
 . S CSYS=$$CSI^ICDEX(FILE,VAL)
 . S OK=$$ICDDESC^ICDXCODE(CSYS,VAL,IDT,.ARRAY)
 ;
 S DESC="" F I=1:1 Q:'$D(ARRAY(I))  Q:ARRAY(I)=" "  S DESC=DESC_ARRAY(I)_" "
 S DESC=$$TKO^BQIUL1(DESC," ")
 Q DESC
 ;
PUNC(X) ;EP
 Q $TR(X,"`~!@#$%^&*()-_=+\|[{]};:'"",<.>/?","")