Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conversion routine at the record-level in a data diction
Message
From
15/07/2007 10:29:08
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
15/07/2007 09:18:07
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01240412
Message ID:
01240537
Views:
21
>>>When creating a data dictionary, would you include code at the record level to transform/convert the field value from the 1st table to the format needed for the 2nd table? It sounds logical to me, but I haven't seen anything quite like it before and wondered if it made sense. So, if a date came in as "20070101" the dictionary would have an algorithm in a field on that record to convert it to [2007^01/01] before populating the 2nd table. Just curious before I begin coding for it... Thanks!
>>
>>I did that once, for a conversion routine - I made a mapping dictionary, with all the code in it. At runtime, I'd pick snippets from there (not all fields were there each time, so I had to pick), put them together in a .prg, pass the engine as a parameter (the engine was an isntance of a class which had all the needed routines as methods), and each snippet accepted that parameter (it was one huge with oThis... endwith block).
>>
>>Accidentally, it was also medical administrative software - not HL7, though, it was ERAS.
>
>I think my time is ruuning short on this project, so I think I'll just macro expand the snippet to convert the format if it exists. I like your idea, but I don't think I have time to build that. Good to know that I was at least on track somewhat. Thanks!

If you have the snippets, just add them to a common .prg, compile it and DO it. Simple as that. Should be a tad faster than running them as macros, because they won't get recompiled for each record.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform