/// <summary> /// Returns the Export settings for an EForm /// </summary> /// <param name="eformName">The name of the EForm</param> /// <returns>Export Settings</returns> public static XmlServiceSettings GetEFormExportSettings(string eformName) { XmlServiceSettings settings = new XmlServiceSettings(); EformConfig config = EformConfig.GetByName(eformName); if (config != null) { string enableDuplicateTables = config.GetConfigurationValue("allowDuplicateRecords"); if (!string.IsNullOrEmpty(enableDuplicateTables)) { settings.EnableDuplicateRecords = enableDuplicateTables.Split(','); } } return(settings); }
/// <summary> /// Starts and the XML root and migrates all nodes to the database that are tables in the DataBase. /// </summary> /// <param name="data">Data to be imported into database.</param> /// <param name="patientId">Patient for whom the data pertains to.</param> public void MigrateData(int patientId, string xml) { // _patientId = patientId; // XmlNode tableNode = _data.DocumentElement.FirstChild; // first take data from "NoTable" nodes and append to the field as specified in the no table attributes // this.AppendNoTableData(); string errors; XmlServiceSettings settings = new XmlServiceSettings(); XmlServices.MigrateEformXml(patientId, xml, out errors, settings); //while (tableNode != null) //{ // this.MigrateNode(tableNode, -1); // tableNode = tableNode.NextSibling; //} }