C2025-024 Electronic Procedures Phase 2 - XML Export

Multi-Unit Resolution, and Fix RO Annotation resolution in Text
This commit is contained in:
2025-07-30 13:47:25 -04:00
parent 8c32d18aec
commit 44025c3978
2 changed files with 47 additions and 32 deletions

View File

@@ -115,6 +115,12 @@ namespace VEPROMS
if (epexportblank || !string.IsNullOrEmpty(val))
{
if (_UnitIndex != 0)
{
val = DisplayText.ResolveUnitSpecific(ii.MyDocVersion, val);
}
XmlElement xindivid = xe.OwnerDocument.CreateElement(EP.name);
//need to resolve ROs ROSingle, ROMulti, in text
@@ -140,14 +146,14 @@ namespace VEPROMS
//XML element with the same xml name as the AccID
foreach (Match m in matches)
{
ROFSTLookup.rochild roc = lookup.GetROChildByAccPageID(m.Groups[1].Value);
ROFSTLookup.rochild roc = lookup.GetROChildByAccPageID(m.Groups[0].Value);
// Exclude replacing Images since are binary - for those, add a sub item
if (Enumerable.Range(8, 15).Contains(roc.type))
{
xindivid.InnerText = val;
XmlElement xroid = AddGraphic(xindivid, m.Groups[1].Value, roc, myRODB, roc.type != 8);
XmlElement xroid = AddGraphic(xindivid, m.Groups[0].Value, roc, myRODB, roc.type != 8);
xindivid.AppendChild(xroid);
}
@@ -159,7 +165,7 @@ namespace VEPROMS
rocvalue = rocvalue.Replace("\xF8", "\xB0");
rocvalue = rocvalue.Replace("\x7F", "\x394"); //delta
if (convertCaretToDeltaSymbol) rocvalue = rocvalue.Replace("^", "\x394"); // delta
val = val.Replace($"<{m.Groups[1].Value}>", rocvalue);
val = val.Replace($"{m.Groups[0].Value}", rocvalue);
xindivid.InnerText = val;
}
}
@@ -288,6 +294,8 @@ namespace VEPROMS
// - that has an attribute designating the location of the image file
private XmlElement AddGraphic(XmlElement xindivid, string Name, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti)
{
Name = Name.Replace("<", "").Replace(">", "");
XmlElement xroid = xindivid.OwnerDocument.CreateElement(Name);
string imgfile = GetROImageFileLocation(roc, rodb, isMulti);