C2025-024 Electronic Procedures Phase 2 - XML Export

Code refactor and added comment
This commit is contained in:
2025-07-18 13:26:16 -04:00
parent 0bf9025c0d
commit 4c4f4d52d2
2 changed files with 5 additions and 8 deletions

View File

@@ -1209,15 +1209,11 @@ namespace VEPROMS
// See if there is an existing format file that was created as a copy. If so, check if the passed in format's // See if there is an existing format file that was created as a copy. If so, check if the passed in format's
// config is the same as an existing 'Copy of' format - if so, use rather than importing the same format as // config is the same as an existing 'Copy of' format - if so, use rather than importing the same format as
// defined by config. // defined by config.
foreach (var existname in existingFormat.Where(existname => existname.Key.Contains(name))) foreach (string cpy in existingFormat.Select(existname => existname.Key).Where(existname => existname.Contains(name) && existname.StartsWith("Copy") && existname.Contains("of " + name)))
{
string cpy = existname.Key;
if (cpy.StartsWith("Copy") && cpy.Contains("of " + name))
{ {
FormatInfo exFI = FormatInfo.Get(existingFormat[cpy]); FormatInfo exFI = FormatInfo.Get(existingFormat[cpy]);
if (exFI.Config == config) return cpy; if (exFI.Config == config) return cpy;
} }
}
return null; return null;
} }
@@ -3110,7 +3106,7 @@ namespace VEPROMS
bool hasNewROID = (content.MyGrid.Data.Contains(glookFor)); bool hasNewROID = (content.MyGrid.Data.Contains(glookFor));
if (hasNewROID) if (hasNewROID)
content.MyGrid.Data = content.MyGrid.Data.Replace(glookFor, greplaceWith); content.MyGrid.Data = content.MyGrid.Data.Replace(glookFor, greplaceWith);
else if (!hasNewROID && glookFor.Contains("0041") && glookFor.Contains("FFFF")) else if (glookFor.Contains("0041") && glookFor.Contains("FFFF"))
{ {
string newGlookFor = glookFor; string newGlookFor = glookFor;
newGlookFor = newGlookFor.Replace("0041", "0000"); newGlookFor = newGlookFor.Replace("0041", "0000");

View File

@@ -313,6 +313,7 @@ namespace VEPROMS
return xroid; return xroid;
} }
//overridden - used to set the RO location for RO Images that are not in annotations
protected override void SetROLocation(ref XmlElement xindivid, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti) protected override void SetROLocation(ref XmlElement xindivid, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti)
{ {
string imgfile = GetROImageFileLocation(roc, rodb, isMulti); string imgfile = GetROImageFileLocation(roc, rodb, isMulti);