private void Button_On_Tick(object sender, EventArgs e) { Mouse_x = this.PointToClient(MousePosition).X; Mouse_y = this.PointToClient(MousePosition).Y; if (Button.Top == 0) { Button.Left = Mouse_x; ON.BringToFront(); Button.BringToFront(); ON.Width = Mouse_x; if (Button.Left >= 38) { Button.Left = 38; } if (Button.Left <= 0) { Button.Left = 0; ON.BringToFront(); Off.BringToFront(); Button.BringToFront(); } } else { Button.Top = 0; } }
public void SendTunePositionsONOFF(ON b) { if (m_connected == false) { throw (new SystemException("No Connected")); } int i = 0; writeBuf[i++] = (byte)CommandCode.CmndLbl; writeBuf[i++] = (byte)CommandCode.msDataBegin; if (b == ON.on) { string cmd = "ATC T"; byte[] array = Encoding.ASCII.GetBytes(cmd); i = SendDataObject(writeBuf, i); } else { string cmd = "ATC F"; byte[] array = Encoding.ASCII.GetBytes(cmd); i = SendDataObject(writeBuf, i); } if (Write(writeBuf, i) == false) { throw (new SystemException("Error write to com")); } }
/// <summary> /// Parse the object from the specified stream /// </summary> public object Parse(System.Xml.XmlReader s, DatatypeFormatterParseResult result) { ENFormatter formatter = new ENFormatter() { Host = this.Host }; var instance = formatter.Parse(s, result) as EN; ON retVal = new ON(EntityNameUse.Alphabetic, instance.Part) { Use = instance.Use }; // Remove non-allowed parts for (int i = retVal.Part.Count - 1; i >= 0; i--) { if (retVal.Part[i].Type == EntityNamePartType.Family || retVal.Part[i].Type == EntityNamePartType.Given) { result.AddResultDetail(new VocabularyIssueResultDetail(ResultDetailType.Warning, String.Format("Part name '{0}' in ON instance will be removed. ON Parts cannot have FAM or GIV parts", retVal.Part[i]), s.ToString(), null)); retVal.Part.RemoveAt(i); } } retVal.NullFlavor = instance.NullFlavor; retVal.Flavor = instance.Flavor; return(retVal); }
/// <summary> /// Graph this object to the specified stream /// </summary> public void Graph(System.Xml.XmlWriter s, object o, DatatypeFormatterGraphResult result) { ENFormatter formatter = new ENFormatter() { Host = this.Host }; // Validate and remove any incriminating data ON instance = o as ON; for (int i = instance.Part.Count - 1; i >= 0; i--) { if (instance.Part[i].Type == EntityNamePartType.Family || instance.Part[i].Type == EntityNamePartType.Given) { result.AddResultDetail(new VocabularyIssueResultDetail(ResultDetailType.Warning, String.Format("Part name '{0}' in ON instance will be removed. ON Parts cannot have FAM or GIV parts", instance.Part[i]), s.ToString(), null)); instance.Part.RemoveAt(i); } } formatter.Graph(s, o, result); }
/// <summary> /// Create a person name from the specified name set /// </summary> public ON CreateON(MARC.HI.EHRS.SVC.Core.DataTypes.NameSet nameSet) { EntityNameUse enUse = EntityNameUse.Legal; if (nameSet == null) { return(null); } try { enUse = (EntityNameUse)Enum.Parse(typeof(EntityNameUse), nameSet.Use.ToString()); } catch { throw; } ON retVal = new ON(); if (enUse != EntityNameUse.Search) { retVal.Use = new SET <CS <EntityNameUse> >(enUse); } // Parts foreach (var part in nameSet.Parts) { retVal.Part.Add(new ENXP(part.Value)); } return(retVal); }
public CustodianOrganization() { this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.id = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.name = new ONImpl(); this.telecom = new TELImpl(); this.addr = new ADImpl(); }
public virtual void TestParseNullNode() { XmlNode node = CreateNode("<something nullFlavor=\"NI\" />"); ON on = (ON) new OnElementParser().Parse(CreateContext(), node, null); Assert.IsNull(on.Value, "OrganizationName"); Assert.IsTrue(on.HasNullFlavor(), "has null flavor"); Assert.AreEqual(Ca.Infoway.Messagebuilder.Domainvalue.Nullflavor.NullFlavor.NO_INFORMATION, on.NullFlavor, "NI null flavor" ); }
public IntendedRecipientOrganization() { this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.id = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.name = new ONImpl(); this.telecom = new LISTImpl <TEL, TelecommunicationAddress>(typeof(TELImpl)); this.addr = new LISTImpl <AD, PostalAddress>(typeof(ADImpl)); this.standardIndustryClassCode = new CE_R2Impl <Code>(); }
public virtual void TestParseEmptyNode() { XmlNode node = CreateNode("<something/>"); ON on = (ON) new OnElementParser().Parse(CreateContext(), node, null); OrganizationName organizationName = on.Value; Assert.IsNotNull(organizationName, "OrganizationName"); Assert.AreEqual(0, organizationName.Parts.Count, "number of name parts"); Assert.AreEqual(0, organizationName.Uses.Count, "number of name uses"); }
private void ON_MouseUp(object sender, MouseEventArgs e) { ON.Image = Properties.Resources.处理1; ON.BringToFront(); Off.BringToFront(); Button.BringToFront(); Button.Left = 0; Off.Width = 50; Checked = false; this.OnClick(null); }
public IntendedRecipient() { this.typeId = new IIImpl(); this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.informationRecipientTypeId = new IIImpl(); this.informationRecipientTemplateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.informationRecipientName = new PNImpl(); this.receivedOrganizationTypeId = new IIImpl(); this.receivedOrganizationTemplateId = new LISTImpl <II, Identifier>(typeof(IIImpl)); this.receivedOrganizationId = new IIImpl(); this.receivedOrganizationName = new ONImpl(); this.receivedOrganizationAddr = new ADImpl(); }
/// <summary> /// Create patient structure for the person suitable for a create /// </summary> private Everest.RMIM.UV.NE2008.MFMI_MT700701UV01.Subject2 <Everest.RMIM.UV.NE2008.PRPA_MT201301UV02.Patient> CreatePatient(RegistrationEvent registrationEvent, TargetConfiguration configuration) { // Get the subject from the list of components var subject = registrationEvent.FindComponent(SVC.Core.ComponentModel.HealthServiceRecordSiteRoleType.SubjectOf) as Person; var masking = subject.FindComponent(SVC.Core.ComponentModel.HealthServiceRecordSiteRoleType.FilterOf) as MaskingIndicator; var providerOrg = subject.FindComponent(SVC.Core.ComponentModel.HealthServiceRecordSiteRoleType.PlaceOfEntry | SVC.Core.ComponentModel.HealthServiceRecordSiteRoleType.InformantTo) as HealthcareParticipant; if (subject == null) // validate { return(null); } var iiSet = new List <II>(CreateIISet(subject.AlternateIdentifiers)); iiSet.RemoveAll(ii => !configuration.NotificationDomain.Exists(o => o.Domain.Equals(ii.Root))); // Construct the return value var retVal = new Everest.RMIM.UV.NE2008.MFMI_MT700701UV01.Subject2 <Everest.RMIM.UV.NE2008.PRPA_MT201301UV02.Patient>( new Everest.RMIM.UV.NE2008.PRPA_MT201301UV02.Patient( new SET <II>(iiSet), CreatePerson(subject, configuration), null )); // Act as a source? // Masking indicator if (masking != null) { retVal.registeredRole.ConfidentialityCode = new SET <CE <string> >(CreateCD <String>(masking.MaskingCode)); } // Provider org var oidData = m_configService.OidRegistrar.FindData(iiSet[0].Root); if (oidData != null) { retVal.registeredRole.ProviderOrganization = new Everest.RMIM.UV.NE2008.COCT_MT150003UV03.Organization() { Id = SET <II> .CreateSET(new II(oidData.Oid)), Name = BAG <ON> .CreateBAG(ON.CreateON(null, new ENXP(oidData.Attributes.Find(o => o.Key == "CustodialOrgName").Value ?? oidData.Description))), ContactParty = new List <Everest.RMIM.UV.NE2008.COCT_MT150003UV03.ContactParty>() { new Everest.RMIM.UV.NE2008.COCT_MT150003UV03.ContactParty() { NullFlavor = NullFlavor.NoInformation } } }; } return(retVal); }
public void R2ONQualifierSerializationTest() { ON inti = new ON(); inti.Part.Add(new ENXP("Health Level Seven, ")); inti.Part.Add(new ENXP("Inc.", EntityNamePartType.Suffix) { Qualifier = SET <CS <EntityNamePartQualifier> > .CreateSET(EntityNamePartQualifier.LegalStatus) }); string expectedXml = @"<test xmlns=""urn:hl7-org:v3"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" flavorId=""EN.ON""><part value=""Health Level Seven, ""/><part type=""TITLE"" value=""Inc."" qualifier=""LS SFX""/></test>"; string actualXml = R2SerializationHelper.SerializeAsString(inti); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
private void SetSoundState() { if (PlayerPrefs.GetInt("Muted", 0) == 0) { AudioListener.volume = 1; ON.SetActive(true); OFF.SetActive(false); } else { AudioListener.volume = 0; ON.SetActive(false); OFF.SetActive(true); } }
internal POCD_MT000040Organization ToPocdOrganization() { POCD_MT000040Organization returnOrg = new POCD_MT000040Organization(); ON orgName = new ON(); orgName.Text = new string[] { this.Name }; returnOrg.name = new ON[] { orgName }; returnOrg.addr = this.AddressList.ToADArray(); returnOrg.telecom = this.TelephoneList.ToTelArray(); returnOrg.id = this.NPI.ToIIArray(); return(returnOrg); }
public void R2ONQualifierParseTest() { ON inti = new ON() { Flavor = "EN.ON" }; inti.Part.Add(new ENXP("Health Level Seven, ")); inti.Part.Add(new ENXP("Inc.", EntityNamePartType.Title) { Qualifier = SET <CS <EntityNamePartQualifier> > .CreateSET(EntityNamePartQualifier.LegalStatus) }); string actualXml = R2SerializationHelper.SerializeAsString(inti); var int2 = R2SerializationHelper.ParseString <ON>(actualXml); Assert.AreEqual(inti, int2); }
/// <summary> /// Parse the object from the specified stream /// </summary> public override object Parse(System.Xml.XmlReader s, DatatypeFormatterParseResult result) { ON retVal = Util.Convert <ON>(base.Parse(s, result) as EN); // Remove non-allowed parts for (int i = retVal.Part.Count - 1; i >= 0; i--) { if (retVal.Part[i].Type == EntityNamePartType.Family || retVal.Part[i].Type == EntityNamePartType.Given) { result.AddResultDetail(new VocabularyIssueResultDetail(ResultDetailType.Warning, String.Format("Part name '{0}' in ON instance will be removed. ON Parts cannot have FAM or GIV parts", retVal.Part[i]), s.ToString(), null)); retVal.Part.RemoveAt(i); } } return(retVal); }
/// <summary> /// Graph this object to the specified stream /// </summary> public override void Graph(System.Xml.XmlWriter s, object o, DatatypeFormatterGraphResult result) { // Validate and remove any incriminating data ON instance = o as ON; instance = new ON(instance.Use, instance.Part); instance.NullFlavor = (o as IAny).NullFlavor; instance.Flavor = (o as IAny).Flavor; for(int i = instance.Part.Count - 1; i >= 0; i--) if (instance.Part[i].Type == EntityNamePartType.Family || instance.Part[i].Type == EntityNamePartType.Given) { result.AddResultDetail(new VocabularyIssueResultDetail(ResultDetailType.Warning, String.Format("Part name '{0}' in ON instance will be removed. ON Parts cannot have FAM or GIV parts", instance.Part[i]), s.ToString(), null)); instance.Part.RemoveAt(i); } base.Graph(s, instance, result); }
/// <summary> /// Graph this object to the specified stream /// </summary> public override void Graph(System.Xml.XmlWriter s, object o, DatatypeFormatterGraphResult result) { // Validate and remove any incriminating data ON instance = o as ON; instance = new ON(instance.Use, instance.Part); instance.NullFlavor = (o as IAny).NullFlavor; instance.Flavor = (o as IAny).Flavor; for (int i = instance.Part.Count - 1; i >= 0; i--) { if (instance.Part[i].Type == EntityNamePartType.Family || instance.Part[i].Type == EntityNamePartType.Given) { result.AddResultDetail(new VocabularyIssueResultDetail(ResultDetailType.Warning, String.Format("Part name '{0}' in ON instance will be removed. ON Parts cannot have FAM or GIV parts", instance.Part[i]), s.ToString(), null)); instance.Part.RemoveAt(i); } } base.Graph(s, instance, result); }
/// <summary> /// Parse the object from the specified stream /// </summary> public object Parse(System.Xml.XmlReader s, DatatypeFormatterParseResult result) { ENFormatter formatter = new ENFormatter() { Host = this.Host }; var instance = formatter.Parse(s, result) as EN; ON retVal = new ON(EntityNameUse.Alphabetic, instance.Part) { Use = instance.Use }; // Remove non-allowed parts for (int i = retVal.Part.Count - 1; i >= 0; i--) if (retVal.Part[i].Type == EntityNamePartType.Family || retVal.Part[i].Type == EntityNamePartType.Given) { result.AddResultDetail(new VocabularyIssueResultDetail(ResultDetailType.Warning, String.Format("Part name '{0}' in ON instance will be removed. ON Parts cannot have FAM or GIV parts", retVal.Part[i]), s.ToString(), null)); retVal.Part.RemoveAt(i); } retVal.NullFlavor = instance.NullFlavor; retVal.Flavor = instance.Flavor; return retVal; }
/// <summary> /// Convert the specified patient record to a registration event /// </summary> internal MARC.Everest.RMIM.UV.NE2008.MFMI_MT700711UV01.RegistrationEvent <MARC.Everest.RMIM.UV.NE2008.PRPA_MT201310UV02.Patient, object> CreateRegistrationEvent(RegistrationEvent res, List <IResultDetail> details) { // Patient var patient = res.FindComponent(SVC.Core.ComponentModel.HealthServiceRecordSiteRoleType.SubjectOf) as Person; if (patient == null) { return new MARC.Everest.RMIM.UV.NE2008.MFMI_MT700711UV01.RegistrationEvent <MARC.Everest.RMIM.UV.NE2008.PRPA_MT201310UV02.Patient, object>() { NullFlavor = NullFlavor.NoInformation } } ; var scoper = patient.FindComponent(HealthServiceRecordSiteRoleType.PlaceOfEntry | HealthServiceRecordSiteRoleType.InformantTo) as HealthcareParticipant; var queryParameter = patient.FindComponent(HealthServiceRecordSiteRoleType.CommentOn | HealthServiceRecordSiteRoleType.ComponentOf) as QueryParameters; var mask = patient.FindComponent(HealthServiceRecordSiteRoleType.FilterOf) as MaskingIndicator; var myOidData = this.m_configService.OidRegistrar.GetOid("CR_CID"); // Return status var retVal = new MARC.Everest.RMIM.UV.NE2008.MFMI_MT700711UV01.RegistrationEvent <MARC.Everest.RMIM.UV.NE2008.PRPA_MT201310UV02.Patient, object>( ActStatus.Active, new MARC.Everest.RMIM.UV.NE2008.MFMI_MT700711UV01.Subject2 <MARC.Everest.RMIM.UV.NE2008.PRPA_MT201310UV02.Patient>( new MARC.Everest.RMIM.UV.NE2008.PRPA_MT201310UV02.Patient( CreateIISet(patient.AlternateIdentifiers, details), ConvertStatus(patient.Status, details), null, new MARC.Everest.RMIM.UV.NE2008.COCT_MT150003UV03.Organization( SET <II> .CreateSET(new II(myOidData.Oid, null)), null, BAG <ON> .CreateBAG(ON.CreateON(null, new ENXP(myOidData.Attributes.Find(o => o.Key == "CustodialOrgName").Value ?? myOidData.Description))), new MARC.Everest.RMIM.UV.NE2008.COCT_MT150003UV03.ContactParty() { NullFlavor = NullFlavor.NoInformation } ), null ) ) ); // Custodian retVal.Custodian = new MARC.Everest.RMIM.UV.NE2008.MFMI_MT700701UV01.Custodian( new MARC.Everest.RMIM.UV.NE2008.COCT_MT090003UV01.AssignedEntity( SET <II> .CreateSET(new II(this.m_configService.Custodianship.Id.Domain)) ) { RepresentedOrganization = new MARC.Everest.RMIM.UV.NE2008.COCT_MT150003UV03.Organization( SET <II> .CreateSET(new II(this.m_configService.Custodianship.Id.Domain, null)), null, BAG <ON> .CreateBAG(ON.CreateON(null, new ENXP(this.m_configService.Custodianship.Name))), new MARC.Everest.RMIM.UV.NE2008.COCT_MT150003UV03.ContactParty() { NullFlavor = NullFlavor.NoInformation } ) } ); retVal.Subject1.registeredRole.SetPatientEntityChoiceSubject(CreatePersonDetail(patient, details)); // Mask if (mask != null) { retVal.Subject1.registeredRole.ConfidentialityCode = new SET <CE <string> >( CreateCD <String>(mask.MaskingCode, details) ); } if (patient.VipCode != null) { retVal.Subject1.registeredRole.VeryImportantPersonCode = CreateCD <String>(patient.VipCode, details); } // Query observation if (queryParameter != null) { retVal.Subject1.registeredRole.SubjectOf1.Add(new MARC.Everest.RMIM.UV.NE2008.PRPA_MT201310UV02.Subject( new MARC.Everest.RMIM.UV.NE2008.PRPA_MT202310UV02.QueryMatchObservation( new CD <string>(queryParameter.MatchingAlgorithm == MatchAlgorithm.Soundex ? "PHCM" : "PTNM", "2.16.840.1.113883.2.20.5.2"), new INT((int)(queryParameter.Confidence * 100)) ) )); } return(retVal); }
private static void MakeInformationRecipientNode(ClinicalDocument ccda) { IntendedRecipient ir = new IntendedRecipient(); //NPI 23456 ir.Id = new SET<II>(new II( "2.16.840.1.113883.4.6", "23456")); ir.InformationRecipient = new Person(new SET<PN>( new PN( new List<ENXP>{ new ENXP("Bernard",EntityNamePartType.Given), new ENXP("Crane",EntityNamePartType.Family), new ENXP("MD",EntityNamePartType.Suffix)}))); ON on = new ON(); on.Part.Add(new ENXP("Springfield Geriatric Associates")); Organization org = new Organization( null, new SET<ON>(on), new SET<TEL>(new TEL("tel:+1(571)555-0165", TelecommunicationAddressUse.WorkPlace)), new SET<AD>(new AD( new ADXP[]{ new ADXP("202 County Line Rd", AddressPartType.StreetAddressLine), new ADXP("Springfield", AddressPartType.City), new ADXP("VA", AddressPartType.State), new ADXP("22150", AddressPartType.PostalCode), new ADXP("US", AddressPartType.Country)})), new CE<string>("207QG0300X", "2.16.840.1.113883.6.101", "NUCC", null, "Geriatric Medicine", null), null); ir.ReceivedOrganization = org; InformationRecipient infor = new InformationRecipient(); infor.IntendedRecipient = ir; ccda.InformationRecipient = new List<InformationRecipient>(); ccda.InformationRecipient.Add(infor); }
public void R2ONQualifierParseTest() { ON inti = new ON() { Flavor = "EN.ON" }; inti.Part.Add(new ENXP("Health Level Seven, ")); inti.Part.Add(new ENXP("Inc.", EntityNamePartType.Title) { Qualifier = SET<CS<EntityNamePartQualifier>>.CreateSET(EntityNamePartQualifier.LegalStatus) }); string actualXml = R2SerializationHelper.SerializeAsString(inti); var int2 = R2SerializationHelper.ParseString<ON>(actualXml); Assert.AreEqual(inti, int2); }
public void R2ONQualifierSerializationTest() { ON inti = new ON(); inti.Part.Add(new ENXP("Health Level Seven, ")); inti.Part.Add(new ENXP("Inc.", EntityNamePartType.Suffix) { Qualifier = SET<CS<EntityNamePartQualifier>>.CreateSET(EntityNamePartQualifier.LegalStatus) }); string expectedXml = @"<test xmlns=""urn:hl7-org:v3"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" flavorId=""EN.ON""><part value=""Health Level Seven, ""/><part type=""TITLE"" value=""Inc."" qualifier=""LS SFX""/></test>"; string actualXml = R2SerializationHelper.SerializeAsString(inti); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
private static AssignedEntity MakeAssignedEntity(string section) { AssignedEntity ae = new AssignedEntity(); if (section == "Legal Authentication" || section == "ComponentOf") { //NPI 12345 ae.Id = new SET<II>(new II( "2.16.840.1.113883.4.6", "12345")); ae.Code = new CE<string>("207QA0505X", "2.16.840.1.113883.6.101", "NUCC", null, "Adult Medicine", null); ae.Addr = new SET<AD>( new AD( new ADXP[]{ new ADXP("1400 Main Street Ste G", AddressPartType.StreetAddressLine), new ADXP("Springfield", AddressPartType.City), new ADXP("VA", AddressPartType.State), new ADXP("22150", AddressPartType.PostalCode), new ADXP("US", AddressPartType.Country)})); ae.Telecom = new SET<TEL>( new TEL("tel:+1(571)555-0179;ext=221", TelecommunicationAddressUse.WorkPlace)); ae.AssignedPerson = new Person(new SET<PN>( new PN( new List<ENXP>{ new ENXP("Raymond",EntityNamePartType.Given), new ENXP("Boccino",EntityNamePartType.Family), new ENXP("MD",EntityNamePartType.Suffix)}))); } if (section == "DocumentationOf") { //NPI 34567 ae.Id = new SET<II>(new II( "2.16.840.1.113883.4.6", "34567")); ae.Code = new CE<string>("207RC0000X", "2.16.840.1.113883.6.101", "NUCC", null, "Cardiovascular Disease", null); ae.Addr = new SET<AD>( new AD( new ADXP[]{ new ADXP("209 County Line Rd", AddressPartType.StreetAddressLine), new ADXP("Springfield", AddressPartType.City), new ADXP("VA", AddressPartType.State), new ADXP("22150", AddressPartType.PostalCode), new ADXP("US", AddressPartType.Country)})); ae.Telecom = new SET<TEL>( new TEL("tel:+1(571)555-0155", TelecommunicationAddressUse.WorkPlace)); ae.AssignedPerson = new Person(new SET<PN>( new PN( new List<ENXP>{ new ENXP("Dwayne",EntityNamePartType.Given), new ENXP("Forge",EntityNamePartType.Family), new ENXP("MD",EntityNamePartType.Suffix)}))); } if (section == "Data Enterer") { ae.Id = new SET<II>(new II( "1.1.1.1.1.1.1.1.2", "678910")); ae.Code = new CE<string>("364SA2200X", "2.16.840.1.113883.6.101", "NUCC", null, "Adult Health", null); ae.Addr = new SET<AD>( new AD( new ADXP[]{ new ADXP("1400 Main Street Ste G", AddressPartType.StreetAddressLine), new ADXP("Springfield", AddressPartType.City), new ADXP("VA", AddressPartType.State), new ADXP("22150", AddressPartType.PostalCode), new ADXP("US", AddressPartType.Country)})); ae.Telecom = new SET<TEL>( new TEL("tel:+1(571)555-0179;ext=222", TelecommunicationAddressUse.WorkPlace)); ae.AssignedPerson = new Person(new SET<PN>( new PN( new List<ENXP>{ new ENXP("Mallory",EntityNamePartType.Given), new ENXP("Bardas",EntityNamePartType.Family), new ENXP("RN",EntityNamePartType.Suffix)}))); } if (section == "PROCEDURES") { //NPI 34567 ae.Id = new SET<II>(new II( "2.16.840.1.113883.4.6", "34567")); ae.Code = new CE<string>("207RC0000X", "2.16.840.1.113883.6.101", "NUCC", null, "Cardiovascular Disease", null); ae.Addr = new SET<AD>( new AD( new ADXP[]{ new ADXP("209 County Line Rd", AddressPartType.StreetAddressLine), new ADXP("Springfield", AddressPartType.City), new ADXP("VA", AddressPartType.State), new ADXP("22150", AddressPartType.PostalCode), new ADXP("US", AddressPartType.Country)})); ae.Telecom = new SET<TEL>( new TEL("tel:+1(571)555-0155", TelecommunicationAddressUse.WorkPlace)); ae.AssignedPerson = new Person(new SET<PN>( new PN( new List<ENXP>{ new ENXP("Dwayne",EntityNamePartType.Given), new ENXP("Forge",EntityNamePartType.Family), new ENXP("MD",EntityNamePartType.Suffix)}))); ON on = new ON(); on.Part.Add(new ENXP("Primo Adult Health")); ae.RepresentedOrganization = new Organization( new SET<II>(new II("1.1.1.1.1.1.1.1.2")), new SET<ON>(on), new SET<TEL>(new TEL("tel:+1(571)555-0155")), new SET<AD>( new AD( new ADXP[]{ new ADXP("209 County Line Rd", AddressPartType.StreetAddressLine), new ADXP("Springfield", AddressPartType.City), new ADXP("VA", AddressPartType.State), new ADXP("22150", AddressPartType.PostalCode), new ADXP("US", AddressPartType.Country)})), null, null); } return ae; }
private static Consumable MakeConsumable(string section) { Consumable c = new Consumable(); if (section == "IMMUNIZATIONS") { ManufacturedProduct mp = new ManufacturedProduct(); mp.ClassCode = new CS<RoleClassManufacturedProduct>(RoleClassManufacturedProduct.ManufacturedProduct); mp.TemplateId = new LIST<II>(); mp.TemplateId.Add(new II("2.16.840.1.113883.10.20.22.4.54")); mp.ManufacturedDrugOrOtherMaterial = new Material(); Material m = new Material(); m.Code = new CE<string>( "140", "2.16.840.1.113883.12.292", "Vaccines administered (CVX)", null, "Influenza, seasonal, injectable, preservative free", null); m.Code.OriginalText = new ED(); m.Code.OriginalText.MediaType = "text/x-hl7-text+xml"; m.Code.OriginalText.Representation = EncapsulatedDataRepresentation.XML; m.Code.OriginalText.Reference = new TEL(); m.Code.OriginalText.Reference.Value = "#immunization1"; mp.ManufacturedDrugOrOtherMaterial = m; ON on = new ON(); on.Part.Add(new ENXP("Influenza Vaccine Company")); mp.ManufacturerOrganization = new Organization(); mp.ManufacturerOrganization.Name = new SET<ON>(); mp.ManufacturerOrganization.Name.Add(on); c.ManufacturedProduct = new ManufacturedProduct(); c.ManufacturedProduct = mp; } if (section == "MEDICATIONS") { ManufacturedProduct mp = new ManufacturedProduct(); mp.ClassCode = new CS<RoleClassManufacturedProduct>(RoleClassManufacturedProduct.ManufacturedProduct); mp.TemplateId = new LIST<II>(); mp.TemplateId.Add(new II("2.16.840.1.113883.10.20.22.4.23")); mp.ManufacturedDrugOrOtherMaterial = new Material(); Material m = new Material(); m.Code = new CE<string>( "314077", "2.16.840.1.113883.6.88", "RxNorm", null, "Lisinopril 20 MG Oral Tablet", null); m.Code.OriginalText = new ED(); m.Code.OriginalText.MediaType = "text/x-hl7-text+xml"; m.Code.OriginalText.Representation = EncapsulatedDataRepresentation.XML; m.Code.OriginalText.Reference = new TEL(); m.Code.OriginalText.Reference.Value = "#medication1"; mp.ManufacturedDrugOrOtherMaterial = m; c.ManufacturedProduct = new ManufacturedProduct(); c.ManufacturedProduct = mp; } return c; }
private static void MakeCustodianNode(ClinicalDocument ccda) { CustodianOrganization rco = new CustodianOrganization(); rco.Id = new SET<II>(new II("1.1.1.1.1.1.1.1.2")); ON on = new ON(); on.Part.Add(new ENXP("Primo Adult Health")); rco.Name = on; rco.Telecom = new TEL("tel:+1(571)555-0179;ext=222", TelecommunicationAddressUse.WorkPlace); rco.Addr = new AD( new ADXP[]{ new ADXP("1400 Main Street Ste G", AddressPartType.StreetAddressLine), new ADXP("Springfield", AddressPartType.City), new ADXP("VA", AddressPartType.State), new ADXP("22150", AddressPartType.PostalCode), new ADXP("US", AddressPartType.Country)}); AssignedCustodian ac = new AssignedCustodian(); ac.RepresentedCustodianOrganization = rco; Custodian custodian = new Custodian(); custodian.AssignedCustodian = ac; ccda.Custodian = custodian; }