Sam Habiel, Pharm.D./ OSEHRA/ 6 Aug 2019
This is the last blog post in the Plan-VI project. We describe how to apply the work of the last year to new languages. We also take the opportunity as well to show VistA CPRS with a few of these languages. We have previously shown Korean and German. In this post, we will show:
In the previous blog post (here, or mirrored here), I mentioned that I would leave the exercise of uppercasing/lowercasing non-English languages as an exercise to the reader. However, in preparing a demo for Russian, I needed the code in order for Russian to uppercase properly.
So here it is. You need to add code to the Language file (#.85) and modify XLFSTR. For the language file portion, the code differs between Caché and GT.M/ YottaDB. The code is as follows that needs to be added to the Language file:
|Field Number||Field Name||Caché Code||GT.M/YDB Code|
|10.4||Uppercase Conversion||S Y=$ZCVT(Y,"U")||S Y=$ZCO(Y,"U")|
|10.5||Lowercase Conversion||S Y=$ZCVT(Y,"L")||S Y=$ZCO(Y,"L")|
And here is the modified XLFSTR (now committed to the plan-vi repo):
The added lines are:
UP+1: I $G(DUZ("LANG"))>1 Q $$OUT^DIALOGU(X,"UC") LOW+1: I $G(DUZ("LANG"))>1 Q $$OUT^DIALOGU(X,"LC")
For the language that you plan to use, you need to set-up the following fields in the language file, as appropriate to your language:
|Field Name||Field Number||Short Name|
|Date/Time Format (FMTE)||10.21||FMTE|
If your language does not have case, there is no need for you to fill UC and LC. DI will tend to be always the same for most languages (the only exception is that if you already use the US date format in your country; if that case, just leave it blank). And you always put the same code in FMTE as DD. Practically then, you only need to modify DD/FMTE to for each language.
Let's discuss what you need to put in:
UC & LC: discussed above.
S:$G(%DT)'["I" %DT=$G(%DT)_"I" G CONT^%DT
DD & FMTE: These differ by date output format for language. Here are the languages we put into VistA and their FMTE:
|Language||Date Format||DD & FMTE|
I did nothing special here. I registered a few patients with non-Engilsh names for testing: SCHÄFER,MARTA (German), ДМИТРИЕВНА,АННА (Cyrillic), and حليم,أبتسام (Arabic). Our changes from the Korean phase of the project to the DPTLK* and XLFNAME* routines that handle name entry needed no further improvements.
Here are some screenshots I have taken with various languages.
Side note: I had an unexpected problem with Russian, seen in this screenshot:
This turned out to be a previously reported problem with the font "MS Sans Serif". Apparently it is not a true type font; surprisingly, changing the font of the bottom tabs to the similarly named "Microsoft Sans Serif" fixes the problem.