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

PXRMCODE.m

Go to the documentation of this file.
  1. PXRMCODE ; SLC/PKR - Routines for handling standard coded items. ;06/05/2003
  1. ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
  1. ;
  1. ;==================================================
  1. VHICD0(DA,X) ;This is the input transform for ICD0 codes subfile 811.22103
  1. ;high code to make sure it is greater than the low code.
  1. ;Do not execute as part of exchange.
  1. I $G(PXRMEXCH) Q 1
  1. N VALID
  1. S VALID=$$VICD0(X)
  1. I 'VALID Q VALID
  1. ;Make sure the high code follows the low code.
  1. N LOW
  1. S LOW=$P(^PXD(811.2,DA(1),80.1,DA,0),U,1)
  1. S VALID=$S(X]LOW:1,X=LOW:1,1:0)
  1. I 'VALID D EN^DDIOL("The high code must be equal to or higher than the low code")
  1. Q VALID
  1. ;
  1. ;==================================================
  1. VHICD9(DA,X) ;This is the input transform for ICD9 codes subfile 811.22102
  1. ;high code to make sure it is greater than the low code.
  1. ;Do not execute as part of exchange.
  1. I $G(PXRMEXCH) Q 1
  1. N VALID
  1. S VALID=$$VICD9(X)
  1. I 'VALID Q VALID
  1. ;Make sure the high code follows the low code.
  1. N LOW
  1. S LOW=$P(^PXD(811.2,DA(1),80,DA,0),U,1)
  1. S VALID=$S(X]LOW:1,X=LOW:1,1:0)
  1. I 'VALID D EN^DDIOL("The high code must be equal to or higher than the low code")
  1. Q VALID
  1. ;
  1. ;==================================================
  1. VHICPT(DA,X) ;This is the input transform for ICPT codes subfile 811.22104
  1. ;high code to make sure it is greater than the low code.
  1. ;Do not execute as part of exchange.
  1. I $G(PXRMEXCH) Q 1
  1. N VALID
  1. S VALID=$$VICPT(X)
  1. I 'VALID Q VALID
  1. ;Make sure the high code follows the low code.
  1. N LOW
  1. S LOW=$P(^PXD(811.2,DA(1),81,DA,0),U,1)
  1. S VALID=$S(X]LOW:1,X=LOW:1,1:0)
  1. I 'VALID D EN^DDIOL("The high code must be equal to or higher than the low code")
  1. Q VALID
  1. ;
  1. ;==================================================
  1. VICD0(X) ;This is the input transform for ICD0 codes, subfile 811.22102.
  1. ;Do not execute as part of exchange.
  1. I $G(PXRMEXCH) Q 1
  1. N RETVAL,TEMP,TEXT
  1. S RETVAL=$$CODE^PXRMVAL(X,80.1)
  1. I '(+RETVAL) D
  1. . S TEXT=X_"-"_$P(RETVAL,U,4)
  1. . D EN^DDIOL(TEXT)
  1. . S TEMP=$P(RETVAL,U,3)
  1. . S:$P(RETVAL,U,2)=$P(RETVAL,U,3) TEMP=""
  1. . I TEMP'="" D
  1. .. S TEXT="(Next code in the file is "_TEMP_")"
  1. .. D EN^DDIOL(TEXT)
  1. Q $P(RETVAL,U,1)
  1. ;
  1. ;==================================================
  1. VICD9(X) ;This is the input transform for ICD9 codes subfile 811.22103.
  1. ;Do not execute as part of exchange.
  1. I $G(PXRMEXCH) Q 1
  1. N RETVAL,TEMP,TEXT
  1. S RETVAL=$$CODE^PXRMVAL(X,80)
  1. I '(+RETVAL) D
  1. . S TEXT=X_"-"_$P(RETVAL,U,4)
  1. . D EN^DDIOL(TEXT)
  1. . S TEMP=$P(RETVAL,U,3)
  1. . S:$P(RETVAL,U,2)=$P(RETVAL,U,3) TEMP=""
  1. . I TEMP'="" D
  1. .. S TEXT="(Next code in the file is "_TEMP_")"
  1. .. D EN^DDIOL(TEXT)
  1. Q $P(RETVAL,U,1)
  1. ;
  1. ;==================================================
  1. VICPT(X) ;This is the input transform for CPT codes subfile 811.22104.
  1. ;Do not execute as part of exchange.
  1. I $G(PXRMEXCH) Q 1
  1. N RETVAL,TEMP,TEXT
  1. S RETVAL=$$CODE^PXRMVAL(X,81)
  1. I '(+RETVAL) D
  1. . S TEXT=X_"-"_$P(RETVAL,U,4)
  1. . D EN^DDIOL(TEXT)
  1. . S TEMP=$P(RETVAL,U,3)
  1. . S:$P(RETVAL,U,2)=$P(RETVAL,U,3) TEMP=""
  1. . I TEMP'="" D
  1. .. S TEXT="(Next code in the file is "_TEMP_")"
  1. .. D EN^DDIOL(TEXT)
  1. Q $P(RETVAL,U,1)
  1. ;