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

VAFCUTL.m

Go to the documentation of this file.
  1. VAFCUTL ;BIR/LTL-utility for the ADT/HL7 PIVOT file 391.71, etc. ;22 Jul 97
  1. ;;5.3;Registration;**149**;Aug 13, 1993
  1. FILERM(PIV,MSG) ;programmer entry point.
  1. ;INPUT PIV - This is the IEN of the ADT/HL7 PIVOT file
  1. ; MSG - This is either the message ID for a successfully
  1. ;sent message or an error message
  1. ;
  1. G:'$G(PIV) FILERMQ
  1. S MSG=$TRANSLATE(MSG,"^","")
  1. N DIE,DA,DR
  1. S DIE="^VAT(391.71,",DA=PIV,DR="1.1////"_$G(MSG)
  1. D ^DIE
  1. ;
  1. FILERMQ Q
  1. ;
  1. COMP(LOCAL,REMOTE) ;string translator
  1. ;INPUT LOCAL - Local data element
  1. ; REMOTE - Remote data element
  1. ;
  1. ;OUTPUT 1 - Match, 0 - No match
  1. ;
  1. ;strip some punctuation and spaces
  1. N STRIP S STRIP=".()- "
  1. S LOCAL=$TR(LOCAL,STRIP),REMOTE=$TR(REMOTE,STRIP)
  1. ;reduce all to lowercase
  1. S LOCAL=$$LOW^XLFSTR(LOCAL),REMOTE=$$LOW^XLFSTR(REMOTE)
  1. Q $S(LOCAL=REMOTE:1,1:0)