C2025-023 - Electronic Procedures - Modifications to PROMS

Working on multiunit for DB Sequence
This commit is contained in:
Matthew Schill 2025-07-16 14:23:55 -04:00
parent b9fc9748c7
commit 2784b57a05
2 changed files with 15 additions and 9 deletions

View File

@ -18,31 +18,34 @@ namespace VEPROMS
#pragma warning restore S101 // Types should be named in PascalCase
{
private readonly AnnotationTypeInfo _AnnotationType;
private readonly int _UnitIndex;
private readonly string multiseparator = ",";
private static Regex _ROAccPageTokenPattern = new Regex("[<][^<>-]+-[^<>]+[>]");
public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId) : base(mode, folderInfo, myFrmVEPROMS, (E_UCFImportOptions) 0)
public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, folderInfo, myFrmVEPROMS, (E_UCFImportOptions) 0)
{
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
_UnitIndex = unitIndex;
_ExportBothConvertedandNot = true;
DocReplace = new Dictionary<int, byte[]>();
FormClosed += OnClose;
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {folderInfo.Name}";
}
public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId) : base(mode, docVersionInfo, myFrmVEPROMS, (E_UCFImportOptions)0)
public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, docVersionInfo, myFrmVEPROMS, (E_UCFImportOptions)0)
{
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
_UnitIndex = unitIndex;
_ExportBothConvertedandNot = true;
DocReplace = new Dictionary<int, byte[]>();
FormClosed += OnClose;
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {docVersionInfo.Name} of {docVersionInfo.MyFolder.Name}";
}
public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId) : base(mode, procedureInfo, myFrmVEPROMS, (E_UCFImportOptions)0)
public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, procedureInfo, myFrmVEPROMS, (E_UCFImportOptions)0)
{
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
_UnitIndex = unitIndex;
_ExportBothConvertedandNot = true;
DocReplace = new Dictionary<int, byte[]>();
FormClosed += OnClose;
@ -242,7 +245,10 @@ namespace VEPROMS
//return a db sequence string from an ItemInfo
private string dbSeq(ItemInfo ii)
{
return $"{((FolderInfo)ii.MyDocVersion.ActiveParent).Name}:{ii.DBSequence}";
if (_UnitIndex > 0) ii.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
string rtnval = $"{((FolderInfo)ii.MyDocVersion.ActiveParent).Name}:{ii.MyProcedure.DisplayNumber} {ii.MyProcedure.DisplayText}:{ii.DBSequence}";
ii.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
return rtnval;
}
//For Exporting an RO that is an image

View File

@ -713,7 +713,7 @@ namespace VEPROMS
//form for exporting Electronic Procedures from FolderInfo
if (args.AnnotationTypeId > 0)
{
dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", fi, this, args.AnnotationTypeId);
dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", fi, this, args.AnnotationTypeId, args.UnitIndex);
dlg.ShowDialog(this);
MySessionInfo.CheckInItem(ownerid);
@ -763,7 +763,7 @@ namespace VEPROMS
//form for exporting Electronic Procedures from DocVersionInfo
if (args.AnnotationTypeId > 0)
{
dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", dvi, this, args.AnnotationTypeId);
dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", dvi, this, args.AnnotationTypeId, args.UnitIndex);
dlg.MyNewProcedure = null;
dlg.ExternalTransitionItem = null;
dlg.ShowDialog(this);
@ -813,7 +813,7 @@ namespace VEPROMS
//form for exporting Electronic Procedures from ProcedureInfo
if (args.AnnotationTypeId > 0)
{
dlgExportImportEP dlg = new dlgExportImportEP("Export", pi, this, args.AnnotationTypeId);
dlgExportImportEP dlg = new dlgExportImportEP("Export", pi, this, args.AnnotationTypeId, args.UnitIndex);
dlg.ShowDialog(this);
MySessionInfo.CheckInItem(ownerid);