/// <summary> Returns all repetitions of Identity of instrument used to perform this study (OM1-14).</summary> public virtual CE[] getIdentityOfInstrumentUsedToPerformThisStudy() { CE[] ret = null; try { Type[] t = this.getField(14); ret = new CE[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (CE)t[i]; } } catch (System.InvalidCastException) { throw new Exception(); } catch (NuGenHL7Exception) { throw new Exception(); } return(ret); }
/// <summary> Returns all repetitions of Normal Text/Codes for Categorical Observations (OM3-4).</summary> public virtual CE[] getNormalTextCodesForCategoricalObservations() { CE[] ret = null; try { Type[] t = this.getField(4); ret = new CE[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (CE)t[i]; } } catch (System.InvalidCastException) { throw new Exception(); } catch (NuGenHL7Exception) { throw new Exception(); } return(ret); }
/// <summary> Returns all repetitions of Outside Site(s) Where Observation may be Performed (OM1-28).</summary> public virtual CE[] getOutsideSiteSWhereObservationMayBePerformed() { CE[] ret = null; try { Type[] t = this.getField(28); ret = new CE[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (CE)t[i]; } } catch (System.InvalidCastException) { throw new Exception(); } catch (NuGenHL7Exception) { throw new Exception(); } return(ret); }
/// <summary> Returns all repetitions of Substance Manufacturer Name (RXD-20).</summary> public virtual CE[] getSubstanceManufacturerName() { CE[] ret = null; try { Type[] t = this.getField(20); ret = new CE[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (CE)t[i]; } } catch (System.InvalidCastException) { throw new Exception(); } catch (NuGenHL7Exception) { throw new Exception(); } return(ret); }
/// <summary> Returns all repetitions of Government Reimbursement Billing Eligibility (PRA-11).</summary> public virtual CE[] getGovernmentReimbursementBillingEligibility() { CE[] ret = null; try { Type[] t = this.getField(11); ret = new CE[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (CE)t[i]; } } catch (System.InvalidCastException) { throw new Exception(); } catch (NuGenHL7Exception) { throw new Exception(); } return(ret); }
/// <summary> Returns all repetitions of Observations required to interpret the observation (OM1-32).</summary> public virtual CE[] getObservationsRequiredToInterpretTheObservation() { CE[] ret = null; try { Type[] t = this.getField(32); ret = new CE[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (CE)t[i]; } } catch (System.InvalidCastException) { throw new Exception(); } catch (NuGenHL7Exception) { throw new Exception(); } return(ret); }
/// <summary> Returns all repetitions of Filler Supplemental Service Information (AIS-12).</summary> public virtual CE[] getFillerSupplementalServiceInformation() { CE[] ret = null; try { Type[] t = this.getField(12); ret = new CE[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (CE)t[i]; } } catch (System.InvalidCastException) { throw new Exception(); } catch (NuGenHL7Exception) { throw new Exception(); } return(ret); }
/// <summary> Returns all repetitions of Test/Observations Included within an Ordered Test Battery (OM5-2).</summary> public virtual CE[] getTestObservationsIncludedWithinAnOrderedTestBattery() { CE[] ret = null; try { Type[] t = this.getField(2); ret = new CE[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (CE)t[i]; } } catch (System.InvalidCastException) { throw new Exception(); } catch (NuGenHL7Exception) { throw new Exception(); } return(ret); }
/// <summary> Returns all repetitions of Department (PRC-3).</summary> public virtual CE[] getDepartment() { CE[] ret = null; try { Type[] t = this.getField(3); ret = new CE[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (CE)t[i]; } } catch (System.InvalidCastException) { throw new Exception(); } catch (NuGenHL7Exception) { throw new Exception(); } return(ret); }
public UnstructuredDocument() { this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.id = new IIImpl(); this.code = new CEImpl(); this.title = new STImpl(); this.effectiveTime = new TSCDAR1Impl(); this.confidentialityCode = new CEImpl(); this.languageCode = new CSImpl(); this.setId = new IIImpl(); this.versionNumber = new INTImpl(); this.copyTime = new TSCDAR1Impl(); this.informant = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.IInformant12Choice>(); this.informationRecipient = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.InformationRecipient>(); this.authenticator = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.Authenticator>(); this.participant = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.IParticipant1Choice>(); this.inFulfillmentOf = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.InFulfillmentOf>(); this.documentationOf = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.DocumentationOf>(); this.relatedDocument = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Basemodel.RelatedDocument>(); this.authorization = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.IAuthorizationChoice>(); }
/// <summary> Returns all repetitions of Provider's Administration Instructions (RXO-7).</summary> public virtual CE[] getProviderSAdministrationInstructions() { CE[] ret = null; try { Type[] t = this.getField(7); ret = new CE[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (CE)t[i]; } } catch (System.InvalidCastException) { throw new Exception(); } catch (NuGenHL7Exception) { throw new Exception(); } return(ret); }
/// <summary> Returns all repetitions of Transport Logistics of Collected Sample (OBR-38).</summary> public virtual CE[] getTransportLogisticsOfCollectedSample() { CE[] ret = null; try { Type[] t = this.getField(38); ret = new CE[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (CE)t[i]; } } catch (System.InvalidCastException) { throw new Exception(); } catch (NuGenHL7Exception) { throw new Exception(); } return(ret); }
public Encounter() { this.classCode = new CSImpl(); this.moodCode = new CSImpl(); this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.id = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.code = new CDImpl(); this.text = new EDImpl <EncapsulatedData>(); this.statusCode = new CSImpl(); this.effectiveTime = new IVLTSCDAR1Impl(); this.dischargeDispositionCode = new CEImpl(); this.priorityCode = new CEImpl(); this.specimen = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.Specimen>(); this.performer = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.Performer2_1>(); this.author = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.Author_1>(); this.informant = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.Informant12>(); this.participant = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.Participant2_2>(); this.entryRelationship = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.EntryRelationship_2>(); this.reference = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Basemodel.Reference>(); this.precondition = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Basemodel.Precondition>(); }
/// <summary> Returns all repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15).</summary> public virtual CE[] getPharmacyTreatmentSupplierSSpecialDispensingInstructions() { CE[] ret = null; try { Type[] t = this.getField(15); ret = new CE[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (CE)t[i]; } } catch (System.InvalidCastException) { throw new Exception(); } catch (NuGenHL7Exception) { throw new Exception(); } return(ret); }
public DiagnosticImagingReport() { this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.id = new IIImpl(); this.code = new CEImpl(); this.title = new STImpl(); this.effectiveTime = new TSCDAR1Impl(); this.confidentialityCode = new CEImpl(); this.languageCode = new CSImpl(); this.setId = new IIImpl(); this.versionNumber = new INTImpl(); this.copyTime = new TSCDAR1Impl(); this.recordTarget = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.RecordTarget>(); this.author = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.Author_2>(); this.informationRecipient = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.InformationRecipient>(); this.authenticator = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.Authenticator>(); this.participant = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.IParticipant1Choice>(); this.inFulfillmentOf = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.InFulfillmentOf>(); this.documentationOf = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Diagnosticimagingreport.IDocumentationOfChoice>(); this.relatedDocument = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Diagnosticimagingreport.IRelatedDocumentChoice>(); this.authorization = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.IAuthorizationChoice>(); }
private void ButtonModify_Click(object sender, EventArgs e) { CE selCE = ((DisplayItem <CE>)listBoxCE.SelectedItem).Item; if (selCE == null) { return; } // only name can be modified? // DataValidator.IsValidName(selCE); // only for person name string newCEName = textBoxCE.Text.Trim(); if (string.IsNullOrEmpty(newCEName)) { MessageBox.Show("Invalid name!"); return; } selCE.Name = newCEName; }
public Act() { this.classCode = new CSImpl(); this.moodCode = new CSImpl(); this.negationInd = new BLImpl(); this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.id = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.code = new CDImpl(); this.text = new EDImpl <EncapsulatedData>(); this.statusCode = new CSImpl(); this.effectiveTime = new IVLTSCDAR1Impl(); this.priorityCode = new CEImpl(); this.languageCode = new CSImpl(); this.specimen = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Basemodel.Specimen>(); this.performer = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Merged.Performer2>(); this.author = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Basemodel.Author>(); this.informant = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Merged.Informant12>(); this.participant = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Merged.Participant2>(); this.entryRelationship = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Basemodel.EntryRelationship>(); this.reference = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Basemodel.Reference>(); this.precondition = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Basemodel.Precondition>(); }
public Observation() { this.negationInd = new BLImpl(); this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.id = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.derivationExpr = new STImpl(); this.text = new EDImpl <EncapsulatedData>(); this.effectiveTime = new IVLTSCDAR1Impl(); this.priorityCode = new CEImpl(); this.repeatNumber = new IVLImpl <INT, Interval <int?> >(); this.languageCode = new CSImpl(); this.value = new INTImpl(); this.interpretationCode = new LISTImpl <CE, Code>(typeof(CEImpl)); this.methodCode = new LISTImpl <CE, Code>(typeof(CEImpl)); this.targetSiteCode = new LISTImpl <CD, Code>(typeof(CDImpl)); this.specimen = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.Specimen>(); this.performer = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.Performer2_1>(); this.informant = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.Informant12>(); this.participant = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.Participant2_2>(); this.reference = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Basemodel.Reference>(); this.precondition = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Basemodel.Precondition>(); this.referenceRange = new List <Ca.Infoway.Messagebuilder.Model.Ccda_pcs_r1_1.Merged.ReferenceRange>(); }
public CE[] GetShuRuMa() { CE[] array = null; try { IType[] field = GetField(27); array = new CE[field.Length]; for (int i = 0; i < array.Length; i++) { array[i] = (CE)field[i]; } } catch (HL7Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new Exception("An unexpected error ocurred", ex); } catch (Exception ex2) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex2); throw new Exception("An unexpected error ocurred", ex2); } return(array); }
protected CE GetCE() { var ce = new CE(); ce.Header = new CEHeader(); ce.Header = new CEHeader { BillingCenter = _ambiente.billingcenter, CodiceFiscale = _ambiente.codicefiscale, ContractId = _ambiente.contractid, ContractType = _ambiente.contracttype, CostCenter = _ambiente.costcenter, Customer = _ambiente.customer, IdCRM = string.Empty, SenderSystem = _ambiente.sendersystem, UserId = _ambiente.smuser, PartitaIva = _ambiente.partitaiva, IDSender = string.Empty, UserType = _ambiente.usertype }; ce.Header.GUIDMessage = _servizio.IdRichiesta; return(ce); }
public BaseModel() { this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.id = new IIImpl(); this.code = new CEImpl(); this.title = new STImpl(); this.effectiveTime = new TSCDAR1Impl(); this.confidentialityCode = new CEImpl(); this.languageCode = new CSImpl(); this.setId = new IIImpl(); this.versionNumber = new INTImpl(); this.copyTime = new TSCDAR1Impl(); this.recordTarget = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Basemodel.RecordTarget>(); this.author = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Basemodel.Author>(); this.informant = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Merged.Informant12>(); this.informationRecipient = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Basemodel.InformationRecipient>(); this.authenticator = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Basemodel.Authenticator>(); this.participant = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Merged.Participant2>(); this.inFulfillmentOf = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Basemodel.InFulfillmentOf>(); this.documentationOf = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Basemodel.DocumentationOf>(); this.relatedDocument = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Merged.RelatedDocument>(); this.authorization = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cda_r1_2.Basemodel.Authorization>(); }
//public Rule(string persistencepath) //{ // this.PersistencePath = persistencepath; //} /// <summary> /// 持久化rule /// </summary> /// <param name="PersistencePath"></param> /// <param name="ruleAssembly"></param> /// <remarks>保存前要先设置persistencePath</remarks> public void SaveRule(CE.Domain.Rule.RuleAssembly ruleAssembly) { XmlDocument xmlDoc = new XmlDocument(); if (!File.Exists(PersistencePath.EndsWith("\\") ? PersistencePath + ruleAssembly.Name + ".xml" : PersistencePath + "\\" + ruleAssembly.Name + ".xml")) { XmlDeclaration dec = xmlDoc.CreateXmlDeclaration("1.0", "GB2312", null); xmlDoc.AppendChild(dec); //创建一个根节点(一级) XmlElement xeroot = xmlDoc.CreateElement(ruleAssembly.Name); xmlDoc.AppendChild(xeroot); XmlNode root = xmlDoc.SelectSingleNode(ruleAssembly.Name);//查找<root> foreach (var ruleset in ruleAssembly.RuleSets) { if (ruleset.Name != null) { XmlElement xe1 = xmlDoc.CreateElement(ruleset.Name);//创建一个<ruleset>节点 XmlElement xesub1 = xmlDoc.CreateElement("RuleSetId"); xesub1.InnerText = ruleset.Id == 0 ? "" : ruleset.Id.ToString(); xe1.AppendChild(xesub1); XmlElement xesub2 = xmlDoc.CreateElement("RuleSetName"); xesub2.InnerText = ruleset.Name ?? ""; xe1.AppendChild(xesub2); XmlElement xesub3 = xmlDoc.CreateElement("RuleSetSetNo"); xesub3.InnerText = ruleset.SetNo.ToString(); xe1.AppendChild(xesub3); XmlElement xesub4 = xmlDoc.CreateElement("NeedImageLocalizer"); xesub4.InnerText = ruleset.NeedImageLocalizer.ToString(); xe1.AppendChild(xesub4); // XmlElement xesub10 = xmlDoc.CreateElement("ImageLocalizerType"); xesub10.InnerText = ruleset.ImageLocalizerType??""; xe1.AppendChild(xesub10); //ImagePath XmlElement xesub6 = xmlDoc.CreateElement("ImagePath"); xesub6.InnerText = ruleset.ImagePath ?? ""; xe1.AppendChild(xesub6); //VirtualPath XmlElement xesub7 = xmlDoc.CreateElement("VirtualPath"); xesub7.InnerText = ruleset.VirtualPath ?? ""; xe1.AppendChild(xesub7); //ImagePath XmlElement xesub8 = xmlDoc.CreateElement("OldRegex"); if (ruleset.OldRegex.Count > 0) { foreach (string item in ruleset.OldRegex) { XmlElement xe2sub = xmlDoc.CreateElement("regexrule"); xe2sub.InnerText = item; xesub8.AppendChild(xe2sub); } } xe1.AppendChild(xesub8); //VirtualPath XmlElement xesub9 = xmlDoc.CreateElement("NewRegex"); if (ruleset.NewRegex.Count > 0) { foreach (string item in ruleset.NewRegex) { var xe2sub = xmlDoc.CreateElement("regexrule"); xe2sub.InnerText = item; xesub9.AppendChild(xe2sub); } } xe1.AppendChild(xesub9); //RuleSetRules var xesub5 = xmlDoc.CreateElement("RuleSetRules"); foreach (var item in ruleset.Rules) { var br = item as CE.Domain.Rule.BeginEndRule; var rr = item as CE.Domain.Rule.RegexRule; var rer = item as CE.Domain.Rule.ReplaceRule; if (br != null) { #region cao! var xe2 = xmlDoc.CreateElement(br.Name); //baseRule的属性 var xe2sub1 = xmlDoc.CreateElement("Id"); xe2sub1.InnerText = br.Id.ToString(); xe2.AppendChild(xe2sub1); var xe2sub2 = xmlDoc.CreateElement("Name"); xe2sub2.InnerText = br.Name; xe2.AppendChild(xe2sub2); var xe2sub3 = xmlDoc.CreateElement("RuleNo"); xe2sub3.InnerText = br.RuleNo.ToString(); xe2.AppendChild(xe2sub3); var xe2sub4 = xmlDoc.CreateElement("PreAppenddBefore"); xe2sub4.InnerText = br.PreAppenddBefore.ToString(); xe2.AppendChild(xe2sub4); var xe2sub5 = xmlDoc.CreateElement("AppendAfter"); xe2sub5.InnerText = br.AppendAfter.ToString(); xe2.AppendChild(xe2sub5); var xe2sub6 = xmlDoc.CreateElement("Enabled"); xe2sub6.InnerText = br.Enabled.ToString(); xe2.AppendChild(xe2sub6); //子类Rule的属性 var ber = (CE.Domain.Rule.BeginEndRule)br; var xe2sub11 = xmlDoc.CreateElement("BeginMark"); xe2sub11.InnerText = ber.BeginMark.ToString(); xe2.AppendChild(xe2sub11); var xe2sub12 = xmlDoc.CreateElement("EndMark"); xe2sub12.InnerText = ber.EndMark; xe2.AppendChild(xe2sub12); var xe2sub13 = xmlDoc.CreateElement("IncludeBeginMark"); xe2sub13.InnerText = ber.IncludeBeginMark.ToString(); xe2.AppendChild(xe2sub13); var xe2sub14 = xmlDoc.CreateElement("IncludeEndMark"); xe2sub14.InnerText = ber.IncludeEndMark.ToString(); xe2.AppendChild(xe2sub14); var xe2sub15 = xmlDoc.CreateElement("RemoveBegin"); xe2sub15.InnerText = ber.RemoveBegin.ToString(); xe2.AppendChild(xe2sub15); var xe2sub16 = xmlDoc.CreateElement("RemoveEnd"); xe2sub16.InnerText = ber.RemoveEnd.ToString(); xe2.AppendChild(xe2sub16); xesub5.AppendChild(xe2); #endregion } if (rr != null) { #region cao! XmlElement xe2 = xmlDoc.CreateElement(rr.Name); //baseRule的属性 XmlElement xe2sub1 = xmlDoc.CreateElement("Id"); xe2sub1.InnerText = rr.Id.ToString(); xe2.AppendChild(xe2sub1); XmlElement xe2sub2 = xmlDoc.CreateElement("Name"); xe2sub2.InnerText = rr.Name; xe2.AppendChild(xe2sub2); XmlElement xe2sub3 = xmlDoc.CreateElement("RuleNo"); xe2sub3.InnerText = rr.RuleNo.ToString(); xe2.AppendChild(xe2sub3); XmlElement xe2sub4 = xmlDoc.CreateElement("PreAppenddBefore"); xe2sub4.InnerText = rr.PreAppenddBefore.ToString(); xe2.AppendChild(xe2sub4); XmlElement xe2sub5 = xmlDoc.CreateElement("AppendAfter"); xe2sub5.InnerText = rr.AppendAfter.ToString(); xe2.AppendChild(xe2sub5); XmlElement xe2sub6 = xmlDoc.CreateElement("Enabled"); xe2sub6.InnerText = rr.Enabled.ToString(); xe2.AppendChild(xe2sub6); //子类Rule的属性 XmlElement xe2sub11 = xmlDoc.CreateElement("RegexExp"); xe2sub11.InnerText = rr.RegexExp.ToString(); xe2.AppendChild(xe2sub11); xesub5.AppendChild(xe2); #endregion } if (rer != null) { #region cao! var xe2 = xmlDoc.CreateElement(rer.Name); //baseRule的属性 var xe2sub1 = xmlDoc.CreateElement("Id"); xe2sub1.InnerText = rer.Id.ToString(); xe2.AppendChild(xe2sub1); var xe2sub2 = xmlDoc.CreateElement("Name"); xe2sub2.InnerText = rer.Name; xe2.AppendChild(xe2sub2); var xe2sub3 = xmlDoc.CreateElement("RuleNo"); xe2sub3.InnerText = rer.RuleNo.ToString(); xe2.AppendChild(xe2sub3); var xe2sub4 = xmlDoc.CreateElement("PreAppenddBefore"); xe2sub4.InnerText = rer.PreAppenddBefore.ToString(); xe2.AppendChild(xe2sub4); var xe2sub5 = xmlDoc.CreateElement("AppendAfter"); xe2sub5.InnerText = rer.AppendAfter.ToString(); xe2.AppendChild(xe2sub5); var xe2sub6 = xmlDoc.CreateElement("Enabled"); xe2sub6.InnerText = rer.Enabled.ToString(); xe2.AppendChild(xe2sub6); //子类Rule的属性 var xe2sub11 = xmlDoc.CreateElement("OldMark"); xe2sub11.InnerText = rer.OldMark.ToString(); xe2.AppendChild(xe2sub11); var xe2sub12 = xmlDoc.CreateElement("NewMark"); xe2sub12.InnerText = rer.NewMark.ToString(); xe2.AppendChild(xe2sub12); xesub5.AppendChild(xe2); #endregion } } xe1.AppendChild(xesub5); if (root != null) root.AppendChild(xe1); } } xmlDoc.Save(PersistencePath.EndsWith("\\") ? PersistencePath + ruleAssembly.Name + ".xml" : PersistencePath + "\\" + ruleAssembly.Name + ".xml"); } else { //xmlDoc.Load(path + ruleAssembly.Name + ".xml"); //删除文件.并重新调用本方法,创建一个新的xml保存文件 File.Delete(PersistencePath.EndsWith("\\") ? PersistencePath + ruleAssembly.Name + ".xml" : PersistencePath + "\\" + ruleAssembly.Name + ".xml"); SaveRule(ruleAssembly); } }
public TerritorialAuthority() { this.code = new CEImpl(); this.territoryCode = new CVImpl(); this.partTypeCode = new CSImpl(); }
public void R2CDCETranslationParseTest() { var cdi = new CE<String>("232323232", "2.16.840.1.113883.6.96") { OriginalText = new ED("Burnt ear with iron. Burnt other ear calling for ambulance"), Translation = SET<CD<String>>.CreateSET( new CD<String>("burn", "2.16.840.1.113883.19.5.2") ) }; string actualXml = R2SerializationHelper.SerializeAsString(cdi); var cd2 = R2SerializationHelper.ParseString<CE<String>>(actualXml); Assert.AreEqual(cdi, cd2); }
public void R2CEOriginalTextNullFlavorTranslationParseTest() { CE<String> cdi = new CE<string>(); cdi.OriginalText = "Extraterrestrial Virus - Black Oil"; cdi.NullFlavor = NullFlavor.Other; cdi.Translation = new SET<CD<string>>( new CD<String>("X^0012", "2.16.3.234.34343.343") ); string actualXml = R2SerializationHelper.SerializeAsString(cdi); var cd2 = R2SerializationHelper.ParseString<CE<String>>(actualXml); Assert.AreEqual(cdi, cd2); }
/// <summary> /// Determines if the code is empty /// </summary> public static bool IsEmpty(this CE me) { return(me.Identifier.IsEmpty() && me.AlternateIdentifier.IsEmpty()); }
public void CEExampleTest01() { CE<String> alternateVirus = new CE<string>(); alternateVirus.Code = "284196006"; alternateVirus.OriginalText = "External Virus - Black Oil"; alternateVirus.Translation = new SET<CD<string>>( new CD<String>("X^0012", "2.16.3.234.34343.343") ); alternateVirus.NullFlavor = null; Console.WriteLine(alternateVirus.Translation.ToString()); Assert.IsTrue(alternateVirus.Validate()); }
public void CENullFlavorTranslationTest() { CE<String> ce = new CE<String>(); ce.NullFlavor = NullFlavor.NoInformation; ce.Translation = new SET<CD<string>>(); ce.Translation.Add( new CD<string>() { Code = "15376812", CodeSystem = "2.16.840.1.113883.3.232.99.1", CodeSystemName = "3M HDD", DisplayName = "BurnOfSkinSCT", }); Assert.IsFalse(ce.Validate()); }
public void CETranslationTranslationTest() { CE<String> ce = new CE<String>(); ce.Code = "284196006"; ce.CodeSystem = "2.16.840.1.113883.6.96"; ce.CodeSystemName = "SNOMED CT"; ce.DisplayName = "Burn of skin"; ce.NullFlavor = null; ce.Translation = new SET<CD<string>>(); ce.Translation.Add( new CD<string>() { Code = "15376812", CodeSystem = "2.16.840.1.113883.3.232.99.1", CodeSystemName = "3M HDD", DisplayName = "BurnOfSkinSCT", NullFlavor = null, Translation = new SET<CD<string>>( new CD<string>() { Code = "284196006", CodeSystem = "2.16.840.1.113883.6.96", CodeSystemName = "SNOMED CT", DisplayName = "Burn of skin" }, CD<String>.Comparator) }); Assert.IsFalse(ce.Validate()); }
public void CEParseGenericCEtoCETest() { // CE<NullFlavor>.Code = Other, 1 Translation CE<NullFlavor> instance = new CE<NullFlavor>(); instance.Code = NullFlavor.Other; instance.Translation = new SET<CD<NullFlavor>>(); instance.Translation.Add(new CD<NullFlavor>(NullFlavor.Other, "2.16.840.1.113883.3.232.99.1")); Console.WriteLine(instance.Translation.Count()); // temporary, equal to 1 // this is where we parse the instance CE<String> parsedCE = Util.FromWireFormat(instance, typeof(CE<String>)) as CE<String>; Console.WriteLine(parsedCE.Translation.Count()); // temporary, equal to 0 // will be true if parsed correctly Assert.IsTrue("OTH" == parsedCE.Code.ToString()); Assert.IsTrue(1 == parsedCE.Translation.Count()); // fails }
public void CECastCEGenericToTypeTest() { // Setting CE<NullFlavor>.Code = Other CE<NullFlavor> ceInstance = new CE<NullFlavor>(); ceInstance.Code = NullFlavor.Other; // will be true if the cast was succesful Assert.IsTrue(NullFlavor.Other == (NullFlavor)ceInstance); }
public void CECastTypeToCEGenericTest() { // set NullFlavor.Other NullFlavor mode = NullFlavor.Other; // create an CE<NullFlavor> instance CE<NullFlavor> ceInstance = new CE<NullFlavor>(); // instance is a CE<T> where T is a nullflavor // cast T to CE<T> ceInstance = mode; // will be true if cast was successful Assert.IsTrue(ceInstance.Code == NullFlavor.Other); }
public void CENullFlavorTest() { CE<String> ce = new CE<String>(); ce.Code = null; ce.CodeSystem = null; ce.CodeSystemName = null; ce.DisplayName = null; ce.NullFlavor = NullFlavor.NoInformation; Assert.IsTrue(ce.Validate()); }
public void CEUseCEAsInterfaceTest() { // CE<NullFlavor>.Code = Other, 2 Translations CE<NullFlavor> ceInstance = new CE<NullFlavor>(); ceInstance.Code = NullFlavor.Other; ceInstance.Translation = new SET<CD<NullFlavor>>(CD<NullFlavor>.Comparator); ceInstance.Translation.Add(new CD<NullFlavor>(NullFlavor.Other, "2.16.840.1.113883.3.232.99.1")); ceInstance.Translation.Add(new CD<NullFlavor>(NullFlavor.Other, "2.16.840.1.113883.3.232.99.2")); Console.WriteLine(ceInstance.Translation.Count()); // Creating an instance of the implementing class and assigning that object to a // reference to any of the interfaces it implements. ICodedEquivalents interfaceUse = ceInstance; // is true if using CE<String> as Interface is possible Assert.IsTrue(interfaceUse.Translation.Count == 2); // passes }
public void CEExampleTest04() { CE<String> alternateVirus = new CE<string>(); alternateVirus.Code = "284196006"; alternateVirus.OriginalText = null; alternateVirus.NullFlavor = null; alternateVirus.Translation = null; try { Console.WriteLine(alternateVirus.Translation.ToString()); } catch { Console.WriteLine("Error: Cannot output translation because it is set to null."); } Assert.IsTrue(alternateVirus.Validate()); }
public void CECodeSystemNameCodeTest() { CE<String> ce = new CE<String>(); ce.Code = "284196006"; ce.CodeSystem = null; ce.CodeSystemName = "SNOMED CT"; ce.DisplayName = null; ce.NullFlavor = null; Assert.IsFalse(ce.Validate()); }
public Author() { this.time = new TSImpl(); this.signatureCode = new CEImpl(); }
public void CECodeSystemTest() { CE<String> ce = new CE<String>(); ce.Code = null; ce.CodeSystem = "2.16.840.1.113883.6.96"; ce.CodeSystemName = null; ce.DisplayName = null; ce.NullFlavor = null; Assert.IsFalse(ce.Validate()); }
private static void NidaleeOnDraw(EventArgs args) { if (Target != null && MainMenu.Item("drawline").GetValue <bool>()) { if (Me.IsDead) { return; } Render.Circle.DrawCircle(Target.Position, Target.BoundingRadius - 50, Color.Yellow); } foreach (var spell in CougarList) { var circle = MainMenu.Item("draw" + spell.Slot).GetValue <Circle>(); if (circle.Active && CougarForm && !Me.IsDead) { Render.Circle.DrawCircle(Me.Position, spell.Range, circle.Color, 2); } } foreach (var spell in HumanList) { var circle = MainMenu.Item("draw" + spell.Slot).GetValue <Circle>(); if (circle.Active && !CougarForm && !Me.IsDead) { Render.Circle.DrawCircle(Me.Position, spell.Range, circle.Color, 2); } } if (!MainMenu.Item("drawcds").GetValue <bool>()) { return; } var wts = Drawing.WorldToScreen(Me.Position); if (!CougarForm) // lets show cooldown timers for the opposite form :) { if (Me.Spellbook.CanUseSpell(SpellSlot.Q) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Null"); } else if (CQ == 0) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Ready"); } else { Drawing.DrawText(wts[0] - 80, wts[1], Color.Orange, "Q: " + CQ.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.W) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Null"); } else if (CW == 0) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Ready"); } else { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.Orange, "W: " + CW.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.E) == SpellState.NotLearned) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Null"); } else if (CE == 0) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Ready"); } else { Drawing.DrawText(wts[0], wts[1], Color.Orange, "E: " + CE.ToString("0.0")); } } else { if (Me.Spellbook.CanUseSpell(SpellSlot.Q) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Null"); } else if (HQ == 0) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Ready"); } else { Drawing.DrawText(wts[0] - 80, wts[1], Color.Orange, "Q: " + HQ.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.W) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Null"); } else if (HW == 0) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Ready"); } else { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.Orange, "W: " + HW.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.E) == SpellState.NotLearned) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Null"); } else if (HE == 0) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Ready"); } else { Drawing.DrawText(wts[0], wts[1], Color.Orange, "E: " + HE.ToString("0.0")); } } }
public void CEDisplayNameTest() { CE<String> ce = new CE<String>(); ce.Code = null; ce.CodeSystem = null; ce.CodeSystemName = null; ce.DisplayName = "Burn of skin"; ce.NullFlavor = null; Assert.IsFalse(ce.Validate()); }
public void R2CDCETranslationSerializationTest() { string expectedXml = @"<test xmlns=""urn:hl7-org:v3"" flavorId=""CD.CE"" code=""232323232"" codeSystem=""2.16.840.1.113883.6.96""><originalText value=""Burnt ear with iron. Burnt other ear calling for ambulance""/><translation code=""burn"" codeSystem=""2.16.840.1.113883.19.5.2""/></test>"; var cdi = new CE<String>("232323232", "2.16.840.1.113883.6.96") { OriginalText = new ED("Burnt ear with iron. Burnt other ear calling for ambulance"), Translation = SET<CD<String>>.CreateSET( new CD<String>("burn", "2.16.840.1.113883.19.5.2") ) }; string actualXml = R2SerializationHelper.SerializeAsString(cdi); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
public void CECodeCodeSystemCodeSystemNameDisplayNameNullFlavorTest() { CE<String> ce = new CE<String>(); ce.Code = "284196006"; ce.CodeSystem = "2.16.840.1.113883.6.96"; ce.CodeSystemName = "SNOMED CT"; ce.DisplayName = "Burn of skin"; ce.NullFlavor = NullFlavor.NoInformation; Assert.IsFalse(ce.Validate()); }
public void CECodeCodeSystemCodeSystemNameTest() { CE<String> ce = new CE<String>(); ce.Code = "284196006"; ce.CodeSystem = "2.16.840.1.113883.6.96"; ce.CodeSystemName = "SNOMED CT"; ce.DisplayName = null; ce.NullFlavor = null; Assert.IsTrue(ce.Validate()); }
public static void DSdataReceived(object receivedata, string name)//处理生化仪样本测试结果 ORU_R01 { DI800Manager.DI800 data = (DI800Manager.DI800)receivedata; HL7Manager.HL7Struct hl7 = new HL7Manager.HL7Struct(); hl7.Item = new List <string>(); PipeParser Parser = new PipeParser(); ORU_R01 oruR01 = new ORU_R01(); #region 消息段封装 //MSH段,位于消息最前面 oruR01.MSH.FieldSeparator.Value = "|"; oruR01.MSH.EncodingCharacters.Value = @"^~\&"; oruR01.MSH.SendingApplication.NamespaceID.Value = GlobalVariable.Manufacturer; //仪器供应商 oruR01.MSH.SendingFacility.NamespaceID.Value = data.Device; oruR01.MSH.DateTimeOfMessage.TimeOfAnEvent.SetLongDate(DateTime.Now); //当前时间 oruR01.MSH.MessageType.MessageType.Value = "ORU"; oruR01.MSH.MessageType.TriggerEvent.Value = "R01"; oruR01.MSH.MessageControlID.Value = "1"; oruR01.MSH.ProcessingID.ProcessingID.Value = "P"; oruR01.MSH.VersionID.VersionID.Value = "2.3.1"; oruR01.MSH.ApplicationAcknowledgmentType.Value = "0";//样本测试结果 oruR01.MSH.GetCharacterSet(0).Value = GlobalVariable.SocketCode ? "ASCII" : "UTF8"; //PID段,主要用来构建病人的个人信息 oruR01.GetPATIENT_RESULT().PATIENT.PID.SetIDPID.Value = "1";//这个值还要商榷 oruR01.GetPATIENT_RESULT().PATIENT.PID.GetPatientIdentifierList(0).ID.Value = data.PATIENT_ID; oruR01.GetPATIENT_RESULT().PATIENT.PID.GetAlternatePatientIDPID(0).ID.Value = data.BED; oruR01.GetPATIENT_RESULT().PATIENT.PID.GetPatientName(0).FamilyLastName.FamilyName.Value = data.FIRST_NAME; oruR01.GetPATIENT_RESULT().PATIENT.PID.GetMotherSMaidenName(0).FamilyLastName.FamilyName.Value = data.AREA; oruR01.GetPATIENT_RESULT().PATIENT.PID.Sex.Value = data.SEX; //OBR段,用于传输关于检验报告相关的医嘱信息 oruR01.GetPATIENT_RESULT().GetORDER_OBSERVATION().OBR.SetIDOBR.Value = "1"; oruR01.GetPATIENT_RESULT().GetORDER_OBSERVATION().OBR.PlacerOrderNumber.EntityIdentifier.Value = data.SAMPLE_ID; oruR01.GetPATIENT_RESULT().GetORDER_OBSERVATION().OBR.ObservationDateTime.TimeOfAnEvent.SetLongDate(data.TIME); oruR01.GetPATIENT_RESULT().GetORDER_OBSERVATION().OBR.SpecimenReceivedDateTime.TimeOfAnEvent.SetLongDate(data.SEND_TIME); oruR01.GetPATIENT_RESULT().GetORDER_OBSERVATION().OBR.FillerField1.Value = data.DOCTOR; oruR01.GetPATIENT_RESULT().GetORDER_OBSERVATION().OBR.FillerField2.Value = data.DEPARTMENT; //oruR01.GetPATIENT_RESULT().GetORDER_OBSERVATION().OBR.SpecimenReceivedDateTime.TimeOfAnEvent.Value = data.TIME; //0BX段,用于在报告消息中传递观察的信息 ORU_R01_ORDER_OBSERVATION orderObservation = oruR01.GetPATIENT_RESULT().GetORDER_OBSERVATION(); int num = data.Result.Count(); if (num != 0) { OBX[] obx = new OBX[num]; CE[] ce = new CE[num]; Varies value; for (int i = 0; i < num; i++) { obx[i] = orderObservation.GetOBSERVATION(i).OBX; obx[i].SetIDOBX.Value = (i + 1).ToString(); obx[i].ValueType.Value = "NM"; obx[i].ObservationSubID.Value = data.Result[i].ITEM; obx[i].ObservationIdentifier.Identifier.Value = data.Result[i].FULL_NAME; ce[i] = new CE(oruR01); value = obx[i].GetObservationValue(0); value.Data = ce[i]; ce[i].Identifier.Value = data.Result[i].RESULT.ToString(); obx[i].Units.Identifier.Value = data.Result[i].UNIT; obx[i].ReferencesRange.Value = data.Result[i].NORMAL_LOW.ToString() + "---" + data.Result[i].NORMAL_HIGH.ToString(); obx[i].GetAbnormalFlags(0).Value = data.Result[i].RESULT > data.Result[i].NORMAL_HIGH ? "H" : (data.Result[i].RESULT < data.Result[i].NORMAL_LOW ? "L" : "N"); obx[i].NatureOfAbnormalTest.Value = data.Result[i].INDICATE; hl7.Item.Add(data.Result[i].ITEM); } } #endregion hl7.HL7Message = Parser.Encode(oruR01); hl7.Sample_ID = data.SAMPLE_ID; hl7.Device = data.Device; hl7.SendTime = data.SEND_TIME.ToString(); hl7Manager.AddHL7(hl7); log.Info("HL7 DS package " + hl7.Sample_ID); }
private void NidaleeOnDraw(EventArgs args) { if (Target != null) { Utility.DrawCircle(Target.Position, Target.BoundingRadius, Color.Red, 1, 1); } foreach (var spell in cougarList) { var circle = Config.Item("draw" + spell.Slot.ToString()).GetValue <Circle>(); if (circle.Active && Kitty && !Me.IsDead) { Utility.DrawCircle(Me.Position, spell.Range, circle.Color, 1, 1); } } foreach (var spell in humanList) { var circle = Config.Item("draw" + spell.Slot.ToString()).GetValue <Circle>(); if (circle.Active && !Kitty && !Me.IsDead) { Utility.DrawCircle(Me.Position, spell.Range, circle.Color, 1, 1); } } if (!Config.Item("drawcds").GetValue <bool>()) { return; } var wts = Drawing.WorldToScreen(Me.Position); if (!Kitty) // lets show cooldown timers for the opposite form :) { if (Me.Spellbook.CanUseSpell(SpellSlot.Q) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Null"); } else if (CQ == 0) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Ready"); } else { Drawing.DrawText(wts[0] - 80, wts[1], Color.Orange, "Q: " + CQ.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.W) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Null"); } else if (CW == 0) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Ready"); } else { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.Orange, "W: " + CW.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.E) == SpellState.NotLearned) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Null"); } else if (CE == 0) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Ready"); } else { Drawing.DrawText(wts[0], wts[1], Color.Orange, "E: " + CE.ToString("0.0")); } } else { if (Me.Spellbook.CanUseSpell(SpellSlot.Q) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Null"); } else if (HQ == 0) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Ready"); } else { Drawing.DrawText(wts[0] - 80, wts[1], Color.Orange, "Q: " + HQ.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.W) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Null"); } else if (HW == 0) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Ready"); } else { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.Orange, "W: " + HW.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.E) == SpellState.NotLearned) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Null"); } else if (HE == 0) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Ready"); } else { Drawing.DrawText(wts[0], wts[1], Color.Orange, "E: " + HE.ToString("0.0")); } } }
public static void PLdataReceived(object receivedata, string name)//处理血小板样本测试结果 ORU_RO1 { PLManager.PL12 data = (PLManager.PL12)receivedata; HL7Manager.HL7Struct hl7 = new HL7Manager.HL7Struct(); hl7.Item = new List <string>(); PipeParser Parser = new PipeParser(); ORU_R01 oruR01 = new ORU_R01(); #region 消息段封装 //MSH段,位于消息最前面 oruR01.MSH.FieldSeparator.Value = "|"; oruR01.MSH.EncodingCharacters.Value = @"^~\&"; oruR01.MSH.SendingApplication.NamespaceID.Value = GlobalVariable.Manufacturer; //仪器供应商 oruR01.MSH.SendingFacility.NamespaceID.Value = data.DEVEICE; oruR01.MSH.DateTimeOfMessage.TimeOfAnEvent.SetLongDate(DateTime.Now); //当前时间 oruR01.MSH.MessageType.MessageType.Value = "ORU"; oruR01.MSH.MessageType.TriggerEvent.Value = "R01"; oruR01.MSH.MessageControlID.Value = "1"; oruR01.MSH.ProcessingID.ProcessingID.Value = "P"; oruR01.MSH.VersionID.VersionID.Value = "2.3.1"; oruR01.MSH.ApplicationAcknowledgmentType.Value = "0";//样本测试结果 oruR01.MSH.GetCharacterSet(0).Value = GlobalVariable.SocketCode ? "ASCII" : "UTF8"; //没有病人信息,PID段直接省略 //OBR段,用于传输关于检验报告相关的医嘱信息 oruR01.GetPATIENT_RESULT().GetORDER_OBSERVATION().OBR.SetIDOBR.Value = "1"; oruR01.GetPATIENT_RESULT().GetORDER_OBSERVATION().OBR.PlacerOrderNumber.EntityIdentifier.Value = data.SAMPLE_ID; oruR01.GetPATIENT_RESULT().GetORDER_OBSERVATION().OBR.ObservationDateTime.TimeOfAnEvent.SetLongDate(data.TEST_TIME); //0BX段,用于在报告消息中传递观察的信息 ORU_R01_ORDER_OBSERVATION orderObservation = oruR01.GetPATIENT_RESULT().GetORDER_OBSERVATION(); int num = data.Result.Count(); if (num != 0) { OBX[] obx = new OBX[num + 1]; CE[] ce = new CE[num + 1]; Varies value; obx[0] = orderObservation.GetOBSERVATION(0).OBX; obx[0].SetIDOBX.Value = "1"; obx[0].ValueType.Value = "NM"; obx[0].ObservationSubID.Value = "AAP"; obx[0].ObservationIdentifier.Identifier.Value = "诱聚剂项目"; ce[0] = new CE(oruR01); value = obx[0].GetObservationValue(0); value.Data = ce[0]; ce[0].Identifier.Value = data.AAP; for (int i = 1; i <= num; i++) { obx[i] = orderObservation.GetOBSERVATION(i).OBX; obx[i].SetIDOBX.Value = (i + 1).ToString(); obx[i].ValueType.Value = "NM"; obx[i].ObservationSubID.Value = data.Result[i - 1].ITEM; obx[i].ObservationIdentifier.Identifier.Value = data.Result[i - 1].FULL_NAME; ce[i] = new CE(oruR01); value = obx[i].GetObservationValue(0); value.Data = ce[i]; ce[i].Identifier.Value = data.Result[i - 1].RESULT.ToString(); if (data.Result[i - 1].UNIT != string.Empty) { obx[i].Units.Identifier.Value = data.Result[i - 1].UNIT; } if (data.Result[i - 1].NORMAL_HIGH != 0) { obx[i].ReferencesRange.Value = data.Result[i - 1].NORMAL_LOW.ToString() + "---" + data.Result[i - 1].NORMAL_HIGH.ToString(); obx[i].GetAbnormalFlags(0).Value = data.Result[i - 1].INDICATE; } hl7.Item.Add(data.Result[i - 1].ITEM); } } #endregion hl7.HL7Message = Parser.Encode(oruR01); hl7.Sample_ID = data.SAMPLE_ID; hl7.Device = data.DEVEICE; hl7Manager.AddHL7(hl7); }
/// <summary> /// Creates an HL7 acknowledgement for a received message. If there is an /// error condition, the acknowledgement will be a negative acknowledgement /// (code AE), otherwise it will be a positive acknowedgement (code AA). /// </summary> /// <param HL7Name="message">The received message</param> /// <param HL7Name="facility">The facility that is returning the acknowledgement</param> /// <param HL7Name="application">The application that is returning the acknowledgement</param> /// <param HL7Name="errorCondition">Null if no error, otherwise a code and description of the error</param> /// <returns>The HL7 acknowledgement</returns> public static HL7Acknowledgement Acknowledge(HL7Message message, string facility, string application, CE errorCondition) { HL7Acknowledgement ack = new HL7Acknowledgement(); ack.MessageHeader = new MSH(); ack.MessageHeader.FieldSeparator = message.MessageHeader.FieldSeparator; ack.MessageHeader.EncodingCharacters = message.MessageHeader.EncodingCharacters; ack.MessageHeader.SendingApplication = new HD() { namespaceID = application }; ack.MessageHeader.SendingFacility = new HD() { namespaceID = facility }; ack.MessageHeader.ReceivingApplication = message.MessageHeader.SendingApplication; ack.MessageHeader.ReceivingFacility = message.MessageHeader.SendingFacility; ack.MessageHeader.DateTimeOfMessage = new TS() { TimestampValue = DateTime.Now }; ack.MessageHeader.Security = message.MessageHeader.Security; ack.MessageHeader.MessageType = message.MessageHeader.MessageType; ack.MessageHeader.MessageControlID = NewMessageControlID(); ack.MessageHeader.ProcessingID = message.MessageHeader.ProcessingID; ack.MessageHeader.VersionID = message.MessageHeader.VersionID; ack.MessageHeader.SequenceNumber = message.MessageHeader.SequenceNumber; ack.MessageHeader.ContinuationPointer = message.MessageHeader.ContinuationPointer; ack.MessageHeader.AcceptAcknowledgmentType = message.MessageHeader.AcceptAcknowledgmentType; ack.MessageHeader.ApplicationAcknowledgmentType = message.MessageHeader.ApplicationAcknowledgmentType; ack.MessageHeader.CountryCode = message.MessageHeader.CountryCode; ack.MessageHeader.CharacterSet = message.MessageHeader.CharacterSet; ack.MessageHeader.PrincipalLanguageOfMessage = message.MessageHeader.PrincipalLanguageOfMessage; ack.MessageHeader.AltCharsetHandlingScheme = message.MessageHeader.AltCharsetHandlingScheme; ack.MessageAcknowledgement = new MSA(); if (errorCondition == null) { ack.MessageAcknowledgement.AcknowledgmentCode = "AA"; } else { ack.MessageAcknowledgement.AcknowledgmentCode = "AE"; ack.MessageAcknowledgement.ErrorCondition = errorCondition; } ack.MessageAcknowledgement.MessageControlID = message.MessageHeader.MessageControlID; return(ack); }
public void CEExampleTest03() { CE<String> alternateVirus = new CE<string>(); alternateVirus.Code = "284196006"; alternateVirus.OriginalText = "External Virus - Black Oil"; alternateVirus.NullFlavor = null; alternateVirus.Translation = null; Assert.IsTrue(alternateVirus.Validate()); }
public InformRequest() { this.code = new CDImpl(); this.subjectModeCode = new CEImpl(); }
public void CECastCEtoCEGenericTest() { // set CE.Code = “OTH”, 1 Translation CE<String> ceInstance = new CE<String>(); ceInstance.Code = "OTH"; ceInstance.Translation = new SET<CD<String>>(); ceInstance.Translation.Add(new CD<String>() { Code = "15376812", CodeSystem = "2.16.840.1.113883.3.232.99.1", CodeSystemName = "3M HDD", DisplayName = "BurnOfSkinSCT", NullFlavor = null }); // create CE<NullFlavor> instance CE<NullFlavor> ceInstance2 = new CE<NullFlavor>(); // cast from CE<String> to CE<T> ceInstance2 = Util.Convert<CE<NullFlavor>>(ceInstance); // these asserts will be true if the cast is done correctly Console.WriteLine(ceInstance2.Translation.Count); Assert.AreEqual(ceInstance2.Code ,NullFlavor.Other); // this will not ever be true because Translation.Count = 1 before the cast // and Translation.Count = 0 after the cast. This is a bug Assert.AreEqual(1, ceInstance2.Translation.Count); // fails }