C2025-024 Electronic Procedures Phase 2 - XML Export
Multi-Unit RO Resolution
This commit is contained in:
@@ -38,7 +38,7 @@ namespace VEPROMS
|
|||||||
|
|
||||||
//C2025-024 Proms EP XML Output
|
//C2025-024 Proms EP XML Output
|
||||||
//this will hold if a specific unit was selected
|
//this will hold if a specific unit was selected
|
||||||
protected int _UnitIndex = 0;
|
readonly protected int _UnitIndex;
|
||||||
|
|
||||||
private ItemInfo _ExternalTransitionItem = null;
|
private ItemInfo _ExternalTransitionItem = null;
|
||||||
public ItemInfo ExternalTransitionItem
|
public ItemInfo ExternalTransitionItem
|
||||||
@@ -75,7 +75,7 @@ namespace VEPROMS
|
|||||||
xa.InnerText = value;
|
xa.InnerText = value;
|
||||||
return xa;
|
return xa;
|
||||||
}
|
}
|
||||||
public dlgExportImport(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset)
|
public dlgExportImport(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset, int unitIndex = 0)
|
||||||
{
|
{
|
||||||
UCFImportDefaultFromSettings = frset;
|
UCFImportDefaultFromSettings = frset;
|
||||||
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
||||||
@@ -83,8 +83,21 @@ namespace VEPROMS
|
|||||||
MyFolder = folderInfo;
|
MyFolder = folderInfo;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.Text = mode + " Dialog for " + folderInfo.Name;
|
this.Text = mode + " Dialog for " + folderInfo.Name;
|
||||||
|
_UnitIndex = unitIndex;
|
||||||
|
|
||||||
|
if (_UnitIndex > 0)
|
||||||
|
{
|
||||||
|
foreach (DocVersionInfo docver in MyFolder.FolderDocVersions)
|
||||||
|
{
|
||||||
|
docver.DocVersionConfig.SelectedSlave = _UnitIndex;
|
||||||
|
|
||||||
|
foreach (ItemInfo proc in docver.Procedures)
|
||||||
|
proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
||||||
|
}
|
||||||
|
FormClosed += RemoveUnit_OnClose;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public dlgExportImport(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset)
|
public dlgExportImport(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset, int unitIndex = 0)
|
||||||
{
|
{
|
||||||
UCFImportDefaultFromSettings = frset;
|
UCFImportDefaultFromSettings = frset;
|
||||||
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
||||||
@@ -95,8 +108,19 @@ namespace VEPROMS
|
|||||||
this.Text = mode;
|
this.Text = mode;
|
||||||
else
|
else
|
||||||
this.Text = mode + " Dialog for " + docVersionInfo.Name + " of " + docVersionInfo.MyFolder.Name;
|
this.Text = mode + " Dialog for " + docVersionInfo.Name + " of " + docVersionInfo.MyFolder.Name;
|
||||||
|
_UnitIndex = unitIndex;
|
||||||
|
|
||||||
|
if (_UnitIndex > 0)
|
||||||
|
{
|
||||||
|
MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
||||||
|
|
||||||
|
foreach (ItemInfo proc in MyDocVersion.Procedures)
|
||||||
|
proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
||||||
|
|
||||||
|
FormClosed += RemoveUnit_OnClose;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public dlgExportImport(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset)
|
public dlgExportImport(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset, int unitIndex = 0)
|
||||||
{
|
{
|
||||||
UCFImportDefaultFromSettings = frset;
|
UCFImportDefaultFromSettings = frset;
|
||||||
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
||||||
@@ -108,6 +132,14 @@ namespace VEPROMS
|
|||||||
//Preset path for single procedures.
|
//Preset path for single procedures.
|
||||||
PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database;
|
PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database;
|
||||||
txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, MyProcedure.DisplayNumber.Replace("/", "_").Replace("\\", "_"));
|
txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, MyProcedure.DisplayNumber.Replace("/", "_").Replace("\\", "_"));
|
||||||
|
_UnitIndex = unitIndex;
|
||||||
|
|
||||||
|
if (_UnitIndex > 0)
|
||||||
|
{
|
||||||
|
MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
||||||
|
MyProcedure.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
||||||
|
FormClosed += RemoveUnit_OnClose;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void dlgExportImport_Load(object sender, EventArgs e)
|
private void dlgExportImport_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -3938,5 +3970,32 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//unset the unit (SelectedSlave)
|
||||||
|
private void RemoveUnit_OnClose(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (MyProcedure != null)
|
||||||
|
{
|
||||||
|
MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||||
|
MyProcedure.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||||
|
}
|
||||||
|
if (MyDocVersion != null)
|
||||||
|
{
|
||||||
|
MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||||
|
|
||||||
|
foreach (ItemInfo proc in MyDocVersion.Procedures)
|
||||||
|
proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
||||||
|
}
|
||||||
|
if (MyFolder != null)
|
||||||
|
{
|
||||||
|
foreach (DocVersionInfo docver in MyFolder.FolderDocVersions)
|
||||||
|
{
|
||||||
|
docver.DocVersionConfig.SelectedSlave = _UnitIndex;
|
||||||
|
|
||||||
|
foreach (ItemInfo proc in docver.Procedures)
|
||||||
|
proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -21,58 +21,29 @@ namespace VEPROMS
|
|||||||
|
|
||||||
private static Regex _ROAccPageTokenPattern = new Regex("[<][^<>-]+-[^<>]+[>]");
|
private static Regex _ROAccPageTokenPattern = new Regex("[<][^<>-]+-[^<>]+[>]");
|
||||||
|
|
||||||
public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, folderInfo, myFrmVEPROMS, (E_UCFImportOptions)0)
|
public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, folderInfo, myFrmVEPROMS, (E_UCFImportOptions)0, unitIndex)
|
||||||
{
|
{
|
||||||
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
|
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
|
||||||
_UnitIndex = unitIndex;
|
|
||||||
_ExportBothConvertedandNot = true;
|
_ExportBothConvertedandNot = true;
|
||||||
DocReplace = new Dictionary<int, byte[]>();
|
DocReplace = new Dictionary<int, byte[]>();
|
||||||
FormClosed += OnClose;
|
FormClosed += OnClose;
|
||||||
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {folderInfo.Name}";
|
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {folderInfo.Name}";
|
||||||
|
|
||||||
if (_UnitIndex > 0)
|
|
||||||
{
|
|
||||||
foreach (DocVersionInfo docver in MyFolder.FolderDocVersions)
|
|
||||||
{
|
|
||||||
docver.DocVersionConfig.SelectedSlave = _UnitIndex;
|
|
||||||
|
|
||||||
foreach (ItemInfo proc in docver.Procedures)
|
|
||||||
proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, docVersionInfo, myFrmVEPROMS, (E_UCFImportOptions)0)
|
public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, docVersionInfo, myFrmVEPROMS, (E_UCFImportOptions)0, unitIndex)
|
||||||
{
|
{
|
||||||
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
|
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
|
||||||
_UnitIndex = unitIndex;
|
|
||||||
_ExportBothConvertedandNot = true;
|
_ExportBothConvertedandNot = true;
|
||||||
DocReplace = new Dictionary<int, byte[]>();
|
DocReplace = new Dictionary<int, byte[]>();
|
||||||
FormClosed += OnClose;
|
FormClosed += OnClose;
|
||||||
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {docVersionInfo.Name} of {docVersionInfo.MyFolder.Name}";
|
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {docVersionInfo.Name} of {docVersionInfo.MyFolder.Name}";
|
||||||
|
|
||||||
if (_UnitIndex > 0)
|
|
||||||
{
|
|
||||||
MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
|
||||||
|
|
||||||
foreach (ItemInfo proc in MyDocVersion.Procedures)
|
|
||||||
proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, procedureInfo, myFrmVEPROMS, (E_UCFImportOptions)0)
|
public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, procedureInfo, myFrmVEPROMS, (E_UCFImportOptions)0, unitIndex)
|
||||||
{
|
{
|
||||||
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
|
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
|
||||||
_UnitIndex = unitIndex;
|
|
||||||
_ExportBothConvertedandNot = true;
|
_ExportBothConvertedandNot = true;
|
||||||
DocReplace = new Dictionary<int, byte[]>();
|
DocReplace = new Dictionary<int, byte[]>();
|
||||||
FormClosed += OnClose;
|
FormClosed += OnClose;
|
||||||
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {procedureInfo.DisplayNumber}";
|
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {procedureInfo.DisplayNumber}";
|
||||||
|
|
||||||
if (_UnitIndex > 0)
|
|
||||||
{
|
|
||||||
MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
|
||||||
MyProcedure.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Overridden function to handle export of EP data
|
//Overridden function to handle export of EP data
|
||||||
@@ -344,32 +315,8 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
|
|
||||||
//clear objects to release memory
|
//clear objects to release memory
|
||||||
//and unset the unit (SelectedSlave)
|
|
||||||
private void OnClose(object sender, EventArgs e)
|
private void OnClose(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (MyProcedure != null)
|
|
||||||
{
|
|
||||||
MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
|
||||||
MyProcedure.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
|
||||||
}
|
|
||||||
if (MyDocVersion != null)
|
|
||||||
{
|
|
||||||
MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
|
||||||
|
|
||||||
foreach (ItemInfo proc in MyDocVersion.Procedures)
|
|
||||||
proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
|
||||||
}
|
|
||||||
if (MyFolder != null)
|
|
||||||
{
|
|
||||||
foreach (DocVersionInfo docver in MyFolder.FolderDocVersions)
|
|
||||||
{
|
|
||||||
docver.DocVersionConfig.SelectedSlave = _UnitIndex;
|
|
||||||
|
|
||||||
foreach (ItemInfo proc in docver.Procedures)
|
|
||||||
proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DocReplace.Clear();
|
DocReplace.Clear();
|
||||||
DocReplace = null;
|
DocReplace = null;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user