private void btnRender_Click(object sender, EventArgs e) { II ii = new II(); // Determine if null flavor should be attached to the object if (cbxNullFlavor.SelectedItem != null) switch (cbxNullFlavor.SelectedItem.ToString()) { case "NAV": ii.NullFlavor = NullFlavor.Unavailable; break; case "OTH": ii.NullFlavor = NullFlavor.Other; break; case "NI": ii.NullFlavor = NullFlavor.NoInformation; break; default: ii.NullFlavor = null; break; } // Determine if a flavor should be attached if (cbxFlavor.SelectedItem != null && cbxFlavor.SelectedItem.ToString() != "None") ii.Flavor = cbxFlavor.SelectedItem.ToString(); // Assign the root and extension ii.Root = txtRoot.Text; ii.Extension = txtExtension.Text; // Represent in txtXml txtXml.Text = FormatterHelper.FormatDataType(ii, "II"); }
/// <summary> /// Creates a patient structure /// </summary> /// <param name="id">The unique identifier</param> /// <param name="name">The name of the patient</param> /// <param name="addr">The primary address</param> /// <param name="telecom">A primary telecom</param> /// <returns>A constructed patient structure</returns> public static Patient CreatePatient( II id, EN name, AD addr, TEL telecom ) { // Instantiate the object var retVal = new Patient(); // Populate address retVal.Addr = BAG<AD>.CreateBAG(addr); // Confidentiality Code retVal.ConfidentialityCode = "N"; // Effective Time of the types // High is populated as "Not Applicable" retVal.EffectiveTime = new IVL<TS>( (TS)DateTime.Now, new TS() { NullFlavor = NullFlavor.NotApplicable } ); // Telecom address retVal.Telecom = BAG<TEL>.CreateBAG(telecom); // Populate the ID retVal.Id = SET<II>.CreateSET(id); // Status Code retVal.StatusCode = RoleStatus.Active; // Return result return retVal; }
internal void AddId(II id) { if (this.id == null) { this.id = new List<II>(); } this.id.Add(id); }
internal new void SetId(string root, string extension) { base.id = new List<II>(); II temp = new II(); temp.Extension = extension; temp.Root = root; this.id.Add(temp); }
internal void AddId(string root, string extension, string assignedAuthorityName) { if (this.id == null) { this.id = new List<II>(); } II temp = new II(); temp.Extension = extension; temp.Root = root; temp.AssigningAuthorityName = assignedAuthorityName; this.id.Add(temp); }
public AdministrativeContactsS() { this.id = new IIImpl(); this.code = new CVImpl(); }
private static void callServiceWithObject() { string clientSystemPatientId = "1234567890"; CDSInput cdsInput = new CDSInput(); II templateId = new II(); templateId.root = "2.16.840.1.113883.3.795.11.1.1"; cdsInput.templateId = new II[] { templateId }; CDSContext cdsContext = new CDSContext(); CD preferredLanguage = new CD(); preferredLanguage.code = "en"; preferredLanguage.codeSystem = "1.2.3"; preferredLanguage.displayName = "English"; cdsContext.cdsInformationRecipientPreferredLanguage = preferredLanguage; cdsInput.cdsContext = cdsContext; VMR vmr = new VMR(); cdsInput.vmrInput = vmr; II vmrTemplateId = new II(); vmrTemplateId.root = "2.16.840.1.113883.3.795.11.1.1"; vmr.templateId = new II[] { vmrTemplateId }; EvaluatedPerson patient = new EvaluatedPerson(); II personTemplateId = new II(); personTemplateId.root = "2.16.840.1.113883.3.795.11.2.1.1"; patient.templateId = new II[] { personTemplateId }; II id = new II(); id.root = "2.16.840.1.113883.3.795.12.100.11"; id.extension = clientSystemPatientId; patient.id = id; EvaluatedPersonDemographics demographics = new EvaluatedPersonDemographics(); TS birthTime = new TS(); birthTime.value = "20110401"; demographics.birthTime = birthTime; CD gender = new CD(); gender.code = "F"; gender.codeSystem = "2.16.840.1.113883.5.1"; demographics.gender = gender; patient.demographics = demographics; vmr.patient = patient; EvaluatedPersonClinicalStatements statements = new EvaluatedPersonClinicalStatements(); patient.clinicalStatements = statements; SubstanceAdministrationEvent statement1 = getSubstanceAdministrationEvent("185", "20110430"); SubstanceAdministrationEvent statement2 = getSubstanceAdministrationEvent("184", "20110523"); SubstanceAdministrationEvent statement3 = getSubstanceAdministrationEvent("183", "20110721"); SubstanceAdministrationEvent statement4 = getSubstanceAdministrationEvent("182", "20110911"); SubstanceAdministrationEvent statement5 = getSubstanceAdministrationEvent("181", "20110912"); statements.substanceAdministrationEvents = new SubstanceAdministrationEvent[] { statement1, statement2, statement3, statement4, statement5 }; CDSOutput response = getResponse(cdsInput); processResponse(response); }
public AdjudicatorBillingTaxAccount() { this.id = new IIImpl(); this.code = new CVImpl(); }
public ToBeRespondedToBy() { this.telecom = new TELImpl(); this.deviceId = new IIImpl(); }
internal void AddId(string root, string extension) { if (this.id == null) { this.id = new List<II>(); } II temp = new II(); temp.Extension = extension; temp.Root = root; this.id.Add(temp); }
public void R2IIScopeParseTest() { string ext = Guid.NewGuid().ToString(); II inti = new II("1.2.3.4.5", ext); inti.Scope = IdentifierScope.ObjectIdentifier; var actualXml = R2SerializationHelper.SerializeAsString(inti); var int2 = R2SerializationHelper.ParseString<II>(actualXml); Assert.AreEqual(inti, int2); }
public DispensePickup() { this.id = new IIImpl(); }
public ActRequest() { this.id = new IIImpl(); }
public RecordTarget() { this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); }
public Entry() { this.typeCode = new CSImpl(); this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); }
public Authorization() { this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); }
public HospitalAdmissionMedicationsSectionentriesOptionalComponent3() { this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); }
public Organization() { this.id = new IIImpl(); this.name = new STImpl(); this.addr = new SETImpl <AD, PostalAddress>(typeof(ADImpl)); }
public void IIExampleTest08() { II token = new II(Guid.NewGuid()); token.Extension = "1234"; token.Displayable = null; token.Scope = null; Assert.IsFalse(II.IsValidTokenFlavor(token)); }
public ReasonForVisitSectionComponent3() { this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); }
public void IIExampleTest10() { II bus = new II(); bus.Root = "1.2.3.4"; bus.Extension = "1234"; bus.Scope = 0; bus.Displayable = true; bus.NullFlavor = null; Assert.IsFalse(II.IsValidBusFlavor(bus)); // testing if token flavor is valid given displayable }
public Custodian() { this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); }
public void R2IIBasicParseTest() { string ext = Guid.NewGuid().ToString(); II inti = new II("1.2.3.4.5", ext); var actualXml = R2SerializationHelper.SerializeAsString(inti); var int2 = R2SerializationHelper.ParseString<II>(actualXml); Assert.AreEqual(inti, int2); }
public Organization() { this.id = new IIImpl(); this.name = new STImpl(); this.addr = new ADImpl(); }
public void R2IIReliabilitySerializationTest() { string ext = Guid.NewGuid().ToString(); II inti = new II("1.2.3.4.5", ext); inti.Reliability = IdentifierReliability.IssuedBySystem; string expectedXml = String.Format(@"<test xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" root=""1.2.3.4.5"" extension=""{0}"" reliability=""ISS"" xmlns=""urn:hl7-org:v3""/>", ext); var actualXml = R2SerializationHelper.SerializeAsString(inti); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
public MedicationActivityEntry() { this.typeCode = new CSImpl(); this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); }
internal void SetId(II id) { this.id = new List<II>(); this.id.Add(id); }
public void IIExampleTest02() { II token = new II(Guid.NewGuid()); II token2 = Guid.NewGuid(); token.Extension = null; token2.Extension = null; token.NullFlavor = null; token2.NullFlavor = null; Assert.IsTrue(token.Validate()); Assert.IsTrue(token2.Validate()); }
public Request_3() { this.classCode = new CSImpl(); this.id = new IIImpl(); }
public void IIExampleTest04() { II token = new II(Guid.NewGuid()); token.NullFlavor = NullFlavor.NoInformation; Assert.IsFalse(token.Validate()); }
private static SubstanceAdministrationEvent getSubstanceAdministrationEvent(string clientImmunizationId, string administrationTime) { II statementTemplateId = new II(); statementTemplateId.root = "2.16.840.1.113883.3.795.11.9.1.1"; CD substanceAdminGeneralPurpose = new CD(); substanceAdminGeneralPurpose.code = "384810002"; substanceAdminGeneralPurpose.codeSystem = "2.16.840.1.113883.6.5"; CD substanceCode = new CD(); substanceCode.code = "08"; substanceCode.codeSystem = "2.16.840.1.113883.12.292"; II id = new II(); id.root = "2.16.840.1.113883.3.795.12.100.10"; id.extension = clientImmunizationId; SubstanceAdministrationEvent statement = new SubstanceAdministrationEvent(); statement.templateId = new II[] { statementTemplateId }; statement.id = id; statement.substanceAdministrationGeneralPurpose = substanceAdminGeneralPurpose; AdministrableSubstance substance = new AdministrableSubstance(); II substanceId = new II(); substanceId.root = System.Guid.NewGuid().ToString("D"); substance.id = substanceId; substance.substanceCode = substanceCode; statement.substance = substance; IVL_TS administrationTimeInterval = new IVL_TS(); administrationTimeInterval.high = administrationTime; administrationTimeInterval.low = administrationTime; statement.administrationTimeInterval = administrationTimeInterval; return statement; }
public void IIExampleTest06() { II rootExtension = new II(); rootExtension.Root = "2.16.840.1.11x3883.1.18"; rootExtension.Extension = "12345"; rootExtension.NullFlavor = null; Assert.IsFalse(II.IsValidOidFlavor(rootExtension)); }
public PayerPerformerPerformer2() { this.templateId = new IIImpl(); }
public HealthcareWorker() { this.id = new SETImpl <II, Identifier>(typeof(IIImpl)); this.assignedPersonName = new PNImpl(); this.assignedPersonAsHealthCareProviderId = new IIImpl(); }
public void IIExampleTest03() { II rootExtension = new II(new OID("1.2.3.4.5.6"), "1234"); rootExtension.NullFlavor = NullFlavor.Unknown; Assert.IsFalse(rootExtension.Validate()); }
public DataEnterer() { this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.time = new TSCDAR1Impl(); }
public void IIExampleTest05() { II oidII = new II(); oidII.Root = "2.16.840.1.113883.1.18"; oidII.Extension = null; // Extension should have to be populated oidII.NullFlavor = null; // when an OID is specified Assert.IsTrue(II.IsValidOidFlavor(oidII)); }
public AuthenticatorPerson() { this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.name = new LISTImpl <PN, PersonName>(typeof(PNImpl)); }
public void IIExampleTest07() { II token = new II(Guid.NewGuid()); token.NullFlavor = null; Assert.IsTrue(II.IsValidTokenFlavor(token)); }
public PolicyOrAccount() { this.id = new IIImpl(); this.code = new CVImpl(); }
public void IIExampleTest9() { II bus = new II(); bus.Root = "1.2.3.4"; bus.Extension = "1234"; bus.Scope = 0; bus.Displayable = null; bus.NullFlavor = null; Assert.IsTrue(II.IsValidBusFlavor(bus)); // testing if token flavor is valid given root, extension, and scope }
public Formularies() { this.id = new IIImpl(); this.title = new STImpl(); }
public void IIExampleTest01() { II rootExtension = new II(new OID("1.2.3.4.5"), "1234"); II rootExtension2 = new II("1.2.3.4.5.6", "1234"); rootExtension.NullFlavor = null; rootExtension2.NullFlavor = null; Console.WriteLine("1= {0}, 2={1}", rootExtension.Root, rootExtension2.Root); Assert.IsTrue(rootExtension.Validate()); Assert.IsTrue(rootExtension2.Validate()); }
public AuthenticationToken() { this.id = new IIImpl(); this.text = new STImpl(); }
public void R2IIScopeSerializationTest() { string ext = Guid.NewGuid().ToString(); II inti = new II("1.2.3.4.5", ext); inti.Scope = IdentifierScope.ObjectIdentifier; string expectedXml = String.Format(@"<test xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" root=""1.2.3.4.5"" extension=""{0}"" scope=""OBJ"" xmlns=""urn:hl7-org:v3""/>", ext); var actualXml = R2SerializationHelper.SerializeAsString(inti); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
public EHRRepository() { this.id = new IIImpl(); this.assignedRepositoryName = new STImpl(); this.representedRepositoryJurisdictionName = new STImpl(); }
public void R2IIReliabilityParseTest() { string ext = Guid.NewGuid().ToString(); II inti = new II("1.2.3.4.5", ext); inti.Reliability = IdentifierReliability.IssuedBySystem; var actualXml = R2SerializationHelper.SerializeAsString(inti); var int2 = R2SerializationHelper.ParseString<II>(actualXml); Assert.AreEqual(inti, int2); }
public RelatedDocument() { this.typeCode = new CSImpl(); this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); }
public void R2IIFullParseTest() { string ext = Guid.NewGuid().ToString(); II inti = new II("1.2.3.4.5", ext); inti.Scope = IdentifierScope.ObjectIdentifier; inti.Reliability = IdentifierReliability.VerifiedBySystem; inti.IdentifierName = "This is an identifier"; var actualXml = R2SerializationHelper.SerializeAsString(inti); var int2 = R2SerializationHelper.ParseString<II>(actualXml); Assert.AreEqual(inti, int2); }
public HealthDocumentAttachment_1() { this.id = new IIImpl(); this.code = new CVImpl(); this.text = new EDImpl <EncapsulatedData>(); }
public All( II a, II b) { _a = a; _b = b; }
public MedicationActivityEntry() { this.typeCode = new CS_R2Impl <Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Domainvalue.x_ActRelationshipEntry>(); this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); }
public void setupCDADocument() { Config = new cdaConfig(); moodCode = "EVN"; classCode = "DOCCLIN"; typeId = new II("2.16.840.1.113883.1.3", "POCD_HD000040"); }
public SpecialAuthorizationAdditionalInformationRequest() { this.id = new IIImpl(); this.text = new STImpl(); }
public FunctionalStatusResultObservationEntry() { this.typeCode = new CS_R2Impl <Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Domainvalue.x_ActRelationshipEntry>(); this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); }
public SpecialAuthorizationRequest() { this.id = new IIImpl(); this.code = new CVImpl(); this.statusCode = new CSImpl(); }
internal void AddIdNull(string flavorCode) { NullFlavor flavorValue; switch (flavorCode) { case "NI": flavorValue = NullFlavor.NoInformation; break; case "UNK": flavorValue = NullFlavor.Unknown; break; default: flavorValue = NullFlavor.NoInformation; break; } //this.id = new List<II>(); II temp = new II(); temp.NullFlavor = flavorValue; this.id.Add(temp); }
public Subject() { this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.awarenessCode = new CE_R2Impl <Code>(); }
/// <summary> /// Example 69 /// Creates a patient structure /// </summary> /// <param name="id">The unique identifier</param> /// <param name="name">The name of the patient</param> /// <param name="addr">The primary address</param> /// <param name="telecom">A primary telecom</param> /// <returns>A constructed patient structure</returns> public Patient CreatePatient( II id, EN name, AD addr, TEL telecom ) { try { // Instantiate the object var retVal = new Patient(); // Populate address retVal.Addr = BAG<AD>.CreateBAG(addr); // Confidentiality Code retVal.ConfidentialityCode = "N"; // Effective Time of the types // High is populated as "Not Applicable" retVal.EffectiveTime = new IVL<TS>( (TS)DateTime.Now, new TS() { NullFlavor = NullFlavor.NotApplicable } ); // Telecom address retVal.Telecom = BAG<TEL>.CreateBAG(telecom); // Populate the ID retVal.Id = SET<II>.CreateSET(id); // Status Code retVal.StatusCode = RoleStatus.Active; // Set entity choice retVal.SetPatientEntityChoiceSubject( new Person() { AdministrativeGenderCode = AdministrativeGender.Male, Name = BAG<EN>.CreateBAG(name), BirthTime = DateTime.Now } ); // cannot return result for unit test purposes return retVal; } catch { Console.WriteLine("Unit tests must not return a value, but Patient must be returned.."); return new Patient(); } }
/// <summary> /// Example 68 /// Creates a patient structure /// </summary> /// <param name="id">The unique identifier</param> /// <param name="name">The name of the patient</param> /// <param name="addr">The primary address</param> /// <param name="telecom">A primary telecom</param> /// <returns>A constructed patient structure</returns> public Patient CreatePatient( II id, EN name, AD addr, TEL telecom ) { // Instantiate the object var retVal = new Patient(); // return a value in a unit test // will result in Not Runnable return retVal; }