protected override IInteraction CreateRequestInteraction() { this.responseExampleResourceFileName = "Resources.PRPA_EX101104CA.xml"; FindCandidatesQuery msg = new FindCandidatesQuery(); this.SetTransportWrapperValues(msg); msg.ControlActEvent = this.CreateControlActEvent(); msg.ControlActEvent.QueryByParameter = new Ca.Infoway.Messagebuilder.Model.Pcs_mr2009_r02_04_02.Common.Merged.QueryByParameter <ParameterList>(); // Set unique query identifier msg.ControlActEvent.QueryByParameter.QueryId = new Identifier(System.Guid.NewGuid().ToString()); // Setup the query parameters ParameterList parameters = new ParameterList(); // person name query parameter parameters.PersonNameValue.Add(PersonName.CreateFirstNameLastName("Cyril", "Lambert")); // Set the birth date of the person... parameters.PersonBirthtimeValue = new PlatformDate(new DateTime(1949, 11, 05)); // client birth date // Set the gender parameters.AdministrativeGenderValue = AdministrativeGender.MALE; msg.ControlActEvent.QueryByParameter.ParameterList = parameters; return(msg); }
protected CreatedBy_1 CreateAuthor_1() { CreatedBy_1 author = new CreatedBy_1(); author.Time = new PlatformDate(); Ca.Infoway.Messagebuilder.Model.Pcs_mr2009_r02_04_02.Common.Coct_mt090102ca.HealthcareWorker authorPerson = new Ca.Infoway.Messagebuilder.Model.Pcs_mr2009_r02_04_02.Common.Coct_mt090102ca.HealthcareWorker(); Identifier healthcareProviderId = new Identifier( "2.16.840.1.113883.3.19.3.163.1.2", "200202888"); PersonName pn = PersonName.CreateFirstNameLastName("Samantha", "Black"); EntityNamePart prefix = new EntityNamePart("Dr.", PersonNamePartType.PREFIX); pn.Uses.Add(EntityNameUse.LEGAL); pn.AddNamePart(prefix); Identifier id = new Identifier("2.16.840.1.113883.3.19.3.163.77.1", "samantha.black"); authorPerson.AssignedPerson = new ActingPerson(); authorPerson.AssignedPerson.AsHealthCareProviderId = healthcareProviderId; authorPerson.AssignedPerson.Name = pn; authorPerson.Id.Add(id); author.AuthorPerson = authorPerson; return(author); }
public virtual void TestPn() { PersonName name = PersonName.CreateFirstNameLastName("John", "Smith"); ANYImpl <object> pnImpl = new ANYImpl <object>(name, null, StandardDataType.PN); string result = new AnyR2PropertyFormatter().Format(new Ca.Infoway.Messagebuilder.Marshalling.HL7.Formatter.FormatContextImpl (this.result, null, "name", "ANY", null, null, false, SpecificationVersion.R02_04_02, null, null, null, false), pnImpl, 0); AssertXml("result", "<name use=\"L\" xsi:type=\"PN\"><given>John</given><family>Smith</family></name>", result); }
// Record Target Set up protected Patient CreateRecordTarget() { // Set the Patient we're querying against Patient patient = new Patient(); // Set patient identifier(s)d patient.Id.Add(new Identifier("2.16.840.1.113883.3.19.3.163.1", "9880897949")); // Set Patient Name patient.PatientPerson = new ActingPerson(); patient.PatientPerson.Name = PersonName.CreateFirstNameLastName("Cyril", "Lambert"); EntityNamePart prefix = new EntityNamePart("Mr.", PersonNamePartType.PREFIX); patient.PatientPerson.Name.Uses.Add(EntityNameUse.LEGAL); patient.PatientPerson.Name.AddNamePart(prefix); // Now set the patient's birthdate patient.PatientPerson.BirthTime = new PlatformDate(new DateTime(1949, 11, 05)); // client birth date // Set Gender patient.PatientPerson.AdministrativeGenderCode = AdministrativeGender.MALE; // Set the address for this patient PostalAddress addr = new PostalAddress(); addr.Uses.Add(X_BasicPostalAddressUse.HOME); addr.Uses.Add(X_BasicPostalAddressUse.PHYSICAL); addr.Uses.Add(X_BasicPostalAddressUse.POSTAL); PostalAddressPart part = new PostalAddressPart(); part.Type = null; part.Value = "1234 Main Street"; addr.AddPostalAddressPart(part); part = new PostalAddressPart(); part.Type = PostalAddressPartType.CITY; part.Value = "Calgary"; addr.AddPostalAddressPart(part); part = new PostalAddressPart(); part.Type = PostalAddressPartType.STATE; part.Value = "Alberta"; addr.AddPostalAddressPart(part); part = new PostalAddressPart(); part.Type = PostalAddressPartType.COUNTRY; part.Value = "Canada"; addr.AddPostalAddressPart(part); patient.Addr = addr; return(patient); }
private ParameterList CreateQueryParameters() { // Lastly, set the Query Parameters ParameterList parameterList = new ParameterList(); // Focus of the query .. look up lab test results for this lab test record: Identifier resultId = new Identifier("2.16.840.1.113883.19.3.207.15.2.13", "R2CBJU7LUAGYP"); // Specific Lab Test parameterList.ObservationIdentifierValue = resultId; // Now set corroborating patient information parameterList.PatientDateofBirthValue = new PlatformDate(new DateTime(1949, 11, 05)); parameterList.PatientGenderValue = AdministrativeGender.MALE; // Set a patient identifier - This is a MANDATORY parameter. Identifier patientID = new Identifier("2.16.840.1.113883.3.19.3.163.1", "9880897949"); parameterList.PatientIDValue = patientID; // For Corroborating the Patient ID parameterList.PatientNameValue = PersonName.CreateFirstNameLastName("Cyril", "Lambert"); return(parameterList); }
private ImmunizationQueryParameters createQueryParameters() { // Lastly, set the Query Parameters ImmunizationQueryParameters parameterList = new ImmunizationQueryParameters(); // Focus of the query .. look up immz detail results for this immz record Identifier immunizationId = new Identifier("2.16.840.1.113883.19.3.207.15.1.1", "829SRFGZ80Y6Z"); parameterList.ImmunizationEventIDValue = immunizationId; // Set the corroborating patient data. parameterList.PatientBirthDateValue = new PlatformDate(new DateTime(1949, 11, 05)); parameterList.PatientGenderValue = AdministrativeGender.MALE; Identifier patientID = new Identifier("2.16.840.1.113883.3.19.3.163.1", "9880897949"); parameterList.PatientIDValue.Add(patientID); // Set a patient identifier parameterList.PatientNameValue = PersonName.CreateFirstNameLastName("Cyril", "Lambert"); return(parameterList); }