C2025-023 - Electronic Procedures - Modifications to PROMS
RO input functionality
This commit is contained in:
parent
a417ddda85
commit
e9e934cfb1
Binary file not shown.
@ -2144,7 +2144,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
filtered.Add(EP);
|
filtered.Add(EP);
|
||||||
|
|
||||||
//check for intersections between unfiltered list and step type list
|
//check for intersections between unfiltered list and step type list
|
||||||
if (EP.validforsteptypes.Any(steptypelist.Contains))
|
List<string> tmpEP = EP.validforsteptypes();
|
||||||
|
if (tmpEP.Any(steptypelist.Contains))
|
||||||
filtered.Add(EP);
|
filtered.Add(EP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,6 +272,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return LazyLoad(ref _text, "@text");
|
return LazyLoad(ref _text, "@text");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//roid of group item that individual sub-items will be the choices for the list/combobox for ROSINGLE and ROMULTI
|
||||||
private LazyLoad<string> _rosource;
|
private LazyLoad<string> _rosource;
|
||||||
public string rosource
|
public string rosource
|
||||||
{
|
{
|
||||||
@ -280,6 +281,22 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return LazyLoad(ref _rosource, "@rosource");
|
return LazyLoad(ref _rosource, "@rosource");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//the columns in the RO that will be included in the exports
|
||||||
|
private LazyLoad<string> _returncols;
|
||||||
|
public List<string> returncols()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string tmp = LazyLoad(ref _returncols, "@returncols");
|
||||||
|
return tmp.Split(',').Select(p => p.Trim()).ToList();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw new ArgumentException($"Error in returncols for EP file: {((EPFormatFile)MyParentFormat).Name}.xml, field: {name}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//number of lines for a multi-line text box to span
|
||||||
private LazyLoad<int?> _numlines;
|
private LazyLoad<int?> _numlines;
|
||||||
public int numlines
|
public int numlines
|
||||||
{
|
{
|
||||||
@ -295,27 +312,26 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
//step types that the EPForma Item is valid for (as a list of types)
|
//step types that the EPForma Item is valid for (as a list of types)
|
||||||
private LazyLoad<string> _validforsteptypes;
|
private LazyLoad<string> _validforsteptypes;
|
||||||
public List<string> validforsteptypes
|
public List<string> validforsteptypes()
|
||||||
{
|
{
|
||||||
get
|
try
|
||||||
{
|
{
|
||||||
try
|
string tmp = LazyLoad(ref _validforsteptypes, "@validforsteptypes");
|
||||||
{
|
return tmp.Split(',').Select(p => p.Trim()).ToList();
|
||||||
string tmp = LazyLoad(ref _validforsteptypes, "@validforsteptypes");
|
}
|
||||||
return tmp.Split(',').Select(p => p.Trim()).ToList();
|
catch
|
||||||
}
|
{
|
||||||
catch
|
throw new ArgumentException($"Error in validforsteptypes for EP file: {((EPFormatFile) MyParentFormat).Name}.xml, field: {name}");
|
||||||
{
|
|
||||||
throw new ArgumentException($"Error in validforsteptypes for EP file: {((EPFormatFile) MyParentFormat).Name}.xml, field: {name}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public bool IsValidForStepType(string StepType)
|
public bool IsValidForStepType(string StepType)
|
||||||
{
|
{
|
||||||
return validforsteptypes.Contains(StepType);
|
List<string> tmp = validforsteptypes();
|
||||||
|
return tmp.Contains(StepType);
|
||||||
}
|
}
|
||||||
|
|
||||||
//return a list of items based on the ROsource specified in the EPFormat File
|
//return a list of items based on the ROsource specified in the EPFormat File
|
||||||
|
//will return all RO items under the Group that's roid = the rosource
|
||||||
public List<ROListItem> getROList(AnnotationInfo currAnn, bool includeblank)
|
public List<ROListItem> getROList(AnnotationInfo currAnn, bool includeblank)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(rosource))
|
if (string.IsNullOrEmpty(rosource))
|
||||||
@ -329,7 +345,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
string roid = FormatRoidKey(rosource, false);
|
string roid = FormatRoidKey(rosource, false);
|
||||||
rochild[] children = lookup.GetRoChildrenByRoid(roid);
|
rochild[] children = lookup.GetRoChildrenByRoid(roid);
|
||||||
|
|
||||||
List<ROListItem> mylist = children.Select(x => new ROListItem(x.title, x.roid)).ToList();
|
List<ROListItem> mylist = children.Select(x => new ROListItem(x.title, x.roid.Substring(0, 12))).ToList();
|
||||||
if (includeblank)
|
if (includeblank)
|
||||||
mylist.Insert(0, new ROListItem("", ""));
|
mylist.Insert(0, new ROListItem("", ""));
|
||||||
|
|
||||||
@ -340,6 +356,39 @@ namespace VEPROMS.CSLA.Library
|
|||||||
throw new ArgumentException($"Error in rosource for EP file: {((EPFormatFile)MyParentFormat).Name}.xml, field: {name}");
|
throw new ArgumentException($"Error in rosource for EP file: {((EPFormatFile)MyParentFormat).Name}.xml, field: {name}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//return a list of values for the specified ROID
|
||||||
|
//given the EP items return columns
|
||||||
|
//will return all RO items under the Group that's roid = the rosource
|
||||||
|
public List<string> getROValuesList(AnnotationInfo currAnn, string roid)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(roid))
|
||||||
|
return new List<string>();
|
||||||
|
|
||||||
|
List<string> values = new List<string>();
|
||||||
|
DocVersionInfo MyDocVersion = currAnn.MyItem.MyDocVersion;
|
||||||
|
ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion);
|
||||||
|
rochild ro = lookup.GetRoChild(roid);
|
||||||
|
|
||||||
|
List<string> rtncols = returncols();
|
||||||
|
|
||||||
|
if (rtncols.Count == 0)
|
||||||
|
{
|
||||||
|
values.Add(ro.value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (string rcol in rtncols)
|
||||||
|
{
|
||||||
|
rochild ro_indiv = Array.Find(ro.children, x => x.appid.EndsWith($".{rcol}"));
|
||||||
|
if (ro_indiv.value != null) values.Add(ro_indiv.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return values;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
//C2025-023 - Electronic Procedures - Modifications to PROMS
|
//C2025-023 - Electronic Procedures - Modifications to PROMS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user