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
AUTCVIT ;IHS/OIT/FBD - CONVERT INSURER TYPE CODE TO POINTER
+1 ;;98.1;IHS DICTIONARIES (POINTERS);**26**;APR 03,2013;Build 6
+2 ;
+3 ;NO TOP-LEVEL ENTRY CALL
QUIT
+4 ;
CONVERT(INSIEN) ;
+1 ;IN A GIVEN 'INSURER' FILE ENTRY:
+2 ;- READ THE CODE SPECIFIED IN THE 'TYPE OF INSURER' SET OF CODES FIELD
+3 ;- FIND THE MATCHING ENTRY IN THE 'INSURER TYPE' FILE
+4 ;- STORE THE IEN OF THE MATCHING ENTRY IN THE 'INSURER TYPE' POINTER FIELD
+5 ; (NO STORAGE IF NO MATCH FOUND)
+6 ;
+7 NEW DA,DIE,DR,ITCODE,ITPTR
+8 ;INSURER TYPE CODE
SET ITCODE=$PIECE($GET(^AUTNINS(INSIEN,2)),U,1)
IF ITCODE=""
QUIT
+9 ;POINTER TO CORRESPONDING 'INSURER TYPE' ENTRY
SET ITPTR=$ORDER(^AUTTINTY("C",ITCODE,""))
IF ITPTR=""
QUIT
+10 SET DIE="^AUTNINS("
SET DA=INSIEN
SET DR=".211///`"_ITPTR
+11 DO ^DIE
+12 QUIT
+13 ;
+14 ;
CVTALL ;RUN 'TYPE OF INSURER' CODE TO 'INSURER TYPE' POINTER FIELD
+1 ; CONVERSION ON ALL INSURER FILE RECORDS
+2 NEW IEN
+3 SET IEN=0
+4 FOR
SET IEN=$ORDER(^AUTNINS(IEN))
IF +IEN=0
QUIT
Begin DoDot:1
+5 DO CONVERT(IEN)
End DoDot:1
+6 QUIT
+7 ;
KILL(IIEN) ;KILL 'INSURER TYPE' FIELD VALUE IN INSURER RECORD IIEN
+1 ;USED FOR KILL LOGIC OF MUMPS XREF ON INSURER FILE'S 'TYPE OF INSURER' FIELD
+2 NEW DA,DIE,DR
+3 SET DIE="^AUTNINS("
+4 SET DA=IIEN
+5 SET DR=".211///@"
+6 DO ^DIE
+7 QUIT