Opened 15 years ago

#10 new defect

Bug in the Fileman import data code (DDMP)...

Reported by: Sam Habiel Owned by:
Priority: major Milestone:
Component: WorldVistA EHR Version:
Keywords: Cc:

Description

Here's the situation:

I am trying to import a (rather large) drug file into Vista from a
csv. Every single time I import, however, the fields seem to get
scrambled so that data don't file because the wrong data types get
filed into fields. For example (file name edited, file isn't called
"Drugs").

Record #1 Rejected:

The value 'No DEA Class Code assigned' for field MED ROUTE ID in

file DRUGS is not valid.
Record #2 Rejected:

The value '41101' for field MED REF GEN DRUG NAME CD in file DRUGS

is not valid.
Record #3 Rejected:

The value '00281024' for field MED REF GEN DRUG NAME CD in file

DRUGS is not valid.

Using the GT.M native debugger, and then Serenji, I was able to
pinpoint down the problem:
In PARSE+15DDMP, there is this line:

S DDMPIN=$P(DDMPIN,DDMPTVAL,2)

The intent of this line is to chop DDMPTVAL from the beginning of
DDMPIN. It works almost all of the time, with one exception: when
DDMPTVAL occurs twice in succession.

GTM> w DDMPIN
"Erythromycin (Bulk) Powder","Erythromycin (Bulk)
Powder","0",00035,00077827,00093978,"","","Misc","Misc.(Non-Drug;
Combo Route)","Powd","Powder","","Powder

GTM> w DDMPTVAL
"Erythromycin (Bulk) Powder"

GTM> W $P(DDMPIN,DDMPTVAL,2)
,
(instead of the expected ,"Erythromycin (Bulk)
Powder","0",00035,00077827,00093978,"","","Misc","Misc.(Non-Drug;
Combo Route)","Powd","Powder","","Powder)

That's why my fields were getting scrambled. The routine thinks that
my csv input has ended and moves on to the next part.

Sam
PS: I am using the latest and greatest MSC FileMan 22.1036

Bugfix:
Change the above mentioned line to this:
... S DDMPIN=$E(DDMPIN,$L(DDMPTVAL)+1,$L(DDMPIN))

I verified that it works with the import that crashed.

Change History (0)

Note: See TracTickets for help on using tickets.