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

AUTCVIT.m

Go to the documentation of this file.
AUTCVIT ;IHS/OIT/FBD - CONVERT INSURER TYPE CODE TO POINTER
 ;;98.1;IHS DICTIONARIES (POINTERS);**26**;APR 03,2013;Build 6
 ;
 Q  ;NO TOP-LEVEL ENTRY CALL
 ;
CONVERT(INSIEN) ;
 ;IN A GIVEN 'INSURER' FILE ENTRY:
 ;- READ THE CODE SPECIFIED IN THE 'TYPE OF INSURER' SET OF CODES FIELD
 ;- FIND THE MATCHING ENTRY IN THE 'INSURER TYPE' FILE
 ;- STORE THE IEN OF THE MATCHING ENTRY IN THE 'INSURER TYPE' POINTER FIELD
 ;  (NO STORAGE IF NO MATCH FOUND)
 ;
 N DA,DIE,DR,ITCODE,ITPTR
 S ITCODE=$P($G(^AUTNINS(INSIEN,2)),U,1) Q:ITCODE=""  ;INSURER TYPE CODE
 S ITPTR=$O(^AUTTINTY("C",ITCODE,""))  Q:ITPTR=""  ;POINTER TO CORRESPONDING 'INSURER TYPE' ENTRY
 S DIE="^AUTNINS(",DA=INSIEN,DR=".211///`"_ITPTR
 D ^DIE
 Q
 ;
 ;
CVTALL ;RUN 'TYPE OF INSURER' CODE TO 'INSURER TYPE' POINTER FIELD
 ;     CONVERSION ON ALL INSURER FILE RECORDS
 N IEN
 S IEN=0
 F  S IEN=$O(^AUTNINS(IEN)) Q:+IEN=0  D
 .D CONVERT(IEN)
 Q
 ;
KILL(IIEN) ;KILL 'INSURER TYPE' FIELD VALUE IN INSURER RECORD IIEN
 ;USED FOR KILL LOGIC OF MUMPS XREF ON INSURER FILE'S 'TYPE OF INSURER' FIELD
 N DA,DIE,DR
 S DIE="^AUTNINS("
 S DA=IIEN
 S DR=".211///@"
 D ^DIE
 Q