More help with Fileman Identifiers needed.

44 views
Skip to first unread message

Kevin Toppenberg

unread,
May 3, 2023, 10:48:13 AM5/3/23
to Hardhats
I had a recent thread about identifiers recently: https://groups.google.com/g/hardhats/c/LCTb-k7Qw8o/m/RyZFoAlLBQAJ

This is a different issue. 

I have a file with this data structure:

File: TMG ENCOUNTER DIAGNOSES                                        Branch: 1
REF  NODE;PIECE     FLD NUM  FIELD NAME
===============================================================================
  1  0;1                .01  SECTION NAME                              [RFJ60]
  2  0;2                .02  SEQUENCE                                  [NJ9,2]
     1;0                  1  ENTRIES                        <-Mult [22753.01P]
  3   -0;1              .01   -DIAGNOSIS                      <-Pntr  [MMP80']
  4   -0;2              .02   -SEQUENCE                                [NJ8,2]
  5   -0;3              .03   -DISPLAY NAME                             [FJ64]
  6   -0;4              .04   -DISPLAY MODE                                [S]
  7   -Computed           1   -DX NAME                                  [CJ64]
 <> <> <>

Notice that it contains subfile (#22753.01)  entries with .01 field being a pointer to #80, which is the ICD DIAGNOSIS file.

When I ask for a listing of subrecords, with LIST^DIC, I pass in a FIELDS parameter of "WID", which has this documentation:

WID:  This returns the fields WRITE (display only) identifiers. The Lister executes each WRITE identifier's M code and copies contents of ^TMP("DIMSG",$J) to the output. You must ensure that the WRITE identifier code issues no direct I/O, but instead calls EN^DDIOL.

Here is the output I am getting

yottadb>d LIST^DIC(22753.01,",5,","WID","E","*",,,,,,"OUT","MSG")

yottadb>ZWR OUT
OUT("DILIST",0)="16^*^0^"
OUT("DILIST",1,1)="F03.90"   <-- not helpful
OUT("DILIST",1,2)="F03.91"
OUT("DILIST",1,3)="G20."
OUT("DILIST",1,4)="G25.9"
OUT("DILIST",1,5)="G30.9"
OUT("DILIST",1,6)="G40.909"
OUT("DILIST",1,7)="G43.909"
OUT("DILIST",1,8)="G43.919"
OUT("DILIST",1,9)="G44.209"
OUT("DILIST",1,10)="G62.9"
OUT("DILIST",1,11)="G90.09"
OUT("DILIST",1,12)="R25.1"
OUT("DILIST",1,13)="R41.3"
OUT("DILIST",1,14)="R41.82"
OUT("DILIST",1,15)="R42."
OUT("DILIST",1,16)="R51."
-cut-

The problem is that I am showing this output to a user.  I want them to see the NAME of the ICD code, not the ICD code itself.   Since the .01 field of subfile 22753.01 is a pointer, and Fileman is converting that pointer into, for example, "F03.90", this seems to be an identifier issue.  I.e. how does a record identify itself when asked?

In this case, I am asking each subfile entry from 22753.01 to identify itself.  And I want to customize how the .01 pointer field is shown.   I don't think I should change the ICD DIAGNOSIS file itself, or any identifiers it has for fear or breaking other parts of VistA. 

I tried to edit the identifiers for 2275.01, but I am not given an opportunity to select .01 field to edit the identifier.  Here is my attempt.

Select Utility Functions Option: identifier

Modify what File: ICD DIAGNOSIS// 22753.01
  Are you adding '22753.01' as a new FILE? No// n  (No) ??

Modify what File: ICD DIAGNOSIS// 22753  TMG ENCOUNTER DIAGNOSES
                                          (18 entries)
Select FIELD: ?
    Answer with FIELD NUMBER, or LABEL
   Choose from:
   .02          SEQUENCE
   1            ENTRIES  (multiple)

Select FIELD: 1  ENTRIES  (multiple)
Select ENTRIES SUB-FIELD: ?
    Answer with ENTRIES SUB-FIELD NUMBER, or LABEL
   Choose from:
   .02          SEQUENCE
   .03          DISPLAY NAME
   .04          DISPLAY MODE

Select ENTRIES SUB-FIELD:



Can anyone help me understand if it is possible to do what I want?  And if so, how to do?  This is making my head hurt.

Kevin

Sam Habiel

unread,
May 3, 2023, 1:16:42 PM5/3/23
to hard...@googlegroups.com
I may be out of my depth here... I am making suggestions in the hope that they will be helpful, not that they will work:

1. ICD is one of the special files that use a special lookup routine. We established a month ago that it does not honor identifiers.
2. I would use the 10th parameter of LIST^DIC:

(Optional) The text to accompany each potential entry in the returned list to help identify it to the end user. This may be set to any valid M code that calls the EN^DDIOL utility to load identification text. The Lister will list this text AFTER that generated by any M identifiers on the file itself. This parameter takes and can change the same input as the SCREEN parameter.

For example, a value of "D EN^DDIOL(""KILROY WAS HERE!"")" would include that string with each entry returned as a separate node under the "ID","WRITE" nodes of the output array.

This parameter should issue no READ or WRITE commands itself nor should it call utilities that issue READs or WRITEs (except for EN^DDIOL itself).

Defaults to no extra identification text.

See the description of EN^DDIOL for more information.

What to use with the 10th parameter is probably a Lexicon API call: https://www.va.gov/vdl/documents/Clinical/Lexicon_Utility/lextm2_0.pdf; but you can probably just get away with writing a simple hand-cooked expression.

--Sam


--
--
http://groups.google.com/group/Hardhats
To unsubscribe, send email to Hardhats+u...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hardhats/23483c31-3614-4be6-a38e-e5c84655408cn%40googlegroups.com.

Kevin Toppenberg

unread,
May 3, 2023, 9:03:10 PM5/3/23
to Hardhats
I'm not thrilled with this solution for a variety of reasons, but at Sam's recommendation, I wrote this short routine:

SUBRECID(OREF,IEN,FILENUM) ;"Callback function from LIST^DIC, optionally used
  ;"This code is designed to be called via IDENTIFIER parameter in LIST^DIC, via
  ;"     "DO SUBRECID^TMGTIUTE(DIC,Y,+$GET(DIFILE))"
  ;"This code should not do any output EXCEPT via EN^DDIOL, e.g.  "D EN^DDIOL(""KILROY WAS HERE!"")"
  ;"INPUT: OREF -- this is the open format of file being transversed, e.g. '^TMG(22753,5,1,'
  ;"       Y -- this is IEN of the item being considered, e.g. '6'
  ;"       FILENUM -- The Fileman number of the file being transversed.  
  IF FILENUM'=22753.01 QUIT  ;"can make more general later.  
  NEW CREF SET CREF=OREF_Y_")"
  NEW ZN SET ZN=$GET(@CREF@(0))
  NEW IEN80 SET IEN80=+ZN
  IF IEN80'>0 QUIT
  NEW CODE SET CODE=$$CODEC^ICDEX(80,IEN80)
  NEW LONGTEXT SET LONGTEXT=$$VLT^ICDEX(80,IEN80)
  NEW OUT SET OUT=CODE
  IF LONGTEXT'="" SET OUT=OUT_" -- "_LONGTEXT
  DO EN^DDIOL(OUT)
  QUIT

Here is the output

yottadb>k OUT d LIST^DIC(22753.01,",5,","WID","E","*",,,,,"D SUBRECID^TMGTIUT3(D
IC,Y,+$GET(DIFILE))","OUT","MSG") zwr OUT

OUT("DILIST",0)="16^*^0^"
OUT("DILIST",1,1)="F03.90"
OUT("DILIST",1,2)="F03.91"
OUT("DILIST",1,3)="G20."
OUT("DILIST",1,4)="G25.9"
OUT("DILIST",1,5)="G30.9"
OUT("DILIST",1,6)="G40.909"
OUT("DILIST",1,7)="G43.909"
OUT("DILIST",1,8)="G43.919"
OUT("DILIST",1,9)="G44.209"
OUT("DILIST",1,10)="G62.9"
OUT("DILIST",1,11)="G90.09"
OUT("DILIST",1,12)="R25.1"
OUT("DILIST",1,13)="R41.3"
OUT("DILIST",1,14)="R41.82"
OUT("DILIST",1,15)="R42."
OUT("DILIST",1,16)="R51."
OUT("DILIST",2,1)=3
OUT("DILIST",2,2)=4
OUT("DILIST",2,3)=13
OUT("DILIST",2,4)=14
OUT("DILIST",2,5)=2
OUT("DILIST",2,6)=16
OUT("DILIST",2,7)=7
OUT("DILIST",2,8)=10
OUT("DILIST",2,9)=8
OUT("DILIST",2,10)=11
OUT("DILIST",2,11)=12
OUT("DILIST",2,12)=15
OUT("DILIST",2,13)=9
OUT("DILIST",2,14)=1
OUT("DILIST",2,15)=5
OUT("DILIST",2,16)=6
OUT("DILIST","ID","WRITE",1,1)="F03.90 -- UNSPECIFIED DEMENTIA WITHOUT BEHAVIORAL DISTURBANCE"
OUT("DILIST","ID","WRITE",2,1)="F03.91 -- UNSPECIFIED DEMENTIA WITH BEHAVIORAL DISTURBANCE"
OUT("DILIST","ID","WRITE",3,1)="G20. -- PARKINSON'S DISEASE"
OUT("DILIST","ID","WRITE",4,1)="G25.9 -- EXTRAPYRAMIDAL AND MOVEMENT DISORDER, UNSPECIFIED"
OUT("DILIST","ID","WRITE",5,1)="G30.9 -- ALZHEIMER'S DISEASE, UNSPECIFIED"
OUT("DILIST","ID","WRITE",6,1)="G40.909 -- EPILEPSY, UNSPECIFIED, NOT INTRACTABLE, WITHOUT STATUS EPILEPTICUS"
OUT("DILIST","ID","WRITE",7,1)="G43.909 -- MIGRAINE, UNSPECIFIED, NOT INTRACTABLE, WITHOUT STATUS MIGRAINOSUS"
OUT("DILIST","ID","WRITE",8,1)="G43.919 -- MIGRAINE, UNSPECIFIED, INTRACTABLE, WITHOUT STATUS MIGRAINOSUS"
OUT("DILIST","ID","WRITE",9,1)="G44.209 -- TENSION-TYPE HEADACHE, UNSPECIFIED, NOT INTRACTABLE"
OUT("DILIST","ID","WRITE",10,1)="G62.9 -- POLYNEUROPATHY, UNSPECIFIED"
OUT("DILIST","ID","WRITE",11,1)="G90.09 -- OTHER IDIOPATHIC PERIPHERAL AUTONOMIC NEUROPATHY"
OUT("DILIST","ID","WRITE",12,1)="R25.1 -- TREMOR, UNSPECIFIED"
OUT("DILIST","ID","WRITE",13,1)="R41.3 -- OTHER AMNESIA"
OUT("DILIST","ID","WRITE",14,1)="R41.82 -- ALTERED MENTAL STATUS, UNSPECIFIED"
OUT("DILIST","ID","WRITE",15,1)="R42. -- DIZZINESS AND GIDDINESS"
OUT("DILIST","ID","WRITE",16,1)="R51. -- HEADACHE"

I think I can use this, but it will be difficult to make this generalizable.  But I think I can use it for now.

Kevin
Reply all
Reply to author
Forward
0 new messages