/// <summary> /// Creates and Hydrates an Authenticator /// Note: the data used within this method is intended as a guide and should be replaced. /// </summary> /// <returns>A Hydrated authenticator</returns> public static void HydrateAuthenticator(IParticipationLegalAuthenticator authenticator, bool mandatoryOnly) { // LegalAuthenticator/assignedEntity authenticator.Participant = BaseCDAModel.CreateParticipantForLegalAuthenticator(); // LegalAuthenticator/time/@value authenticator.Participant.DateTimeAuthenticated = new ISO8601DateTime(DateTime.Now, ISO8601DateTime.Precision.Minute); // LegalAuthenticator/assignedEntity/assignedPerson authenticator.Participant.Person = BaseCDAModel.CreatePerson(); var localAuthorityCode = BaseCDAModel.CreateCodableText("EI", CodingSystem.HL7IdentifierType, null, null, null); // LegalAuthenticator/assignedEntity/<Entity Identifier> authenticator.Participant.Person.Identifiers = new List <Identifier> { BaseCDAModel.CreateIdentifier("LocalAuthority", null, "66666", "1.2.3.4.5", localAuthorityCode), BaseCDAModel.CreateHealthIdentifier(HealthIdentifierType.HPII, "8003615833334118") }; //LegalAuthenticator/assignedEntity/assignedPerson/<Person Name> var name1 = BaseCDAModel.CreatePersonName(); name1.GivenNames = new List <string> { "Good" }; name1.FamilyName = "Doctor"; name1.Titles = new List <string> { "Doctor" }; name1.NameUsages = new List <NameUsage> { NameUsage.Legal }; authenticator.Participant.Person.PersonNames = new List <IPersonName> { name1 }; if (!mandatoryOnly) { // LegalAuthenticator/assignedEntity/code authenticator.Role = BaseCDAModel.CreateRole(Occupation.GeneralMedicalPractitioner); // LegalAuthenticator/assignedEntity/<Address> var address1 = BaseCDAModel.CreateAddress(); address1.AddressPurpose = AddressPurpose.Residential; address1.AustralianAddress = BaseCDAModel.CreateAustralianAddress(); address1.AustralianAddress.UnstructuredAddressLines = new List <string> { "1 Clinician Street" }; address1.AustralianAddress.SuburbTownLocality = "Nehtaville"; address1.AustralianAddress.State = AustralianState.QLD; address1.AustralianAddress.PostCode = "5555"; address1.AustralianAddress.DeliveryPointId = 32568931; var address2 = BaseCDAModel.CreateAddress(); address2.AddressPurpose = AddressPurpose.TemporaryAccommodation; address2.InternationalAddress = BaseCDAModel.CreateInternationalAddress(); address2.InternationalAddress.AddressLine = new List <string> { "1 Overseas Street" }; address2.InternationalAddress.Country = Country.Albania; address2.InternationalAddress.PostCode = "12345"; address2.InternationalAddress.StateProvince = "Foreign Land"; var addressList = new List <IAddress> { address1, address2 }; authenticator.Participant.Addresses = addressList; // LegalAuthenticator/assignedEntity/<Electronic Communication Detail> var coms1 = BaseCDAModel.CreateElectronicCommunicationDetail( "0345754566", ElectronicCommunicationMedium.Telephone, ElectronicCommunicationUsage.WorkPlace); var coms2 = BaseCDAModel.CreateElectronicCommunicationDetail( "*****@*****.**", ElectronicCommunicationMedium.Email, ElectronicCommunicationUsage.WorkPlace); authenticator.Participant.ElectronicCommunicationDetails = new List <ElectronicCommunicationDetail> { coms1, coms2 }; // LegalAuthenticator/assignedEntity/representedOrganization authenticator.Participant.Organisation = BaseCDAModel.CreateOrganisationName(); // LegalAuthenticator/assignedEntity/representedOrganization/name authenticator.Participant.Organisation.Name = "Oz Health Clinic"; // LegalAuthenticator/assignedEntity/representedOrganization/<Entity Identifier> authenticator.Participant.Organisation.Identifiers = new List <Identifier> { BaseCDAModel.CreateIdentifier("SampleAuthority", null, null, "1.2.3.4.55555", null), BaseCDAModel.CreateHealthIdentifier(HealthIdentifierType.HPIO, "8003620000001144") }; } }
/// <summary> /// Creates and Hydrates an SubjectofCare /// Note: the data used within this method is intended as a guide and should be replaced. /// </summary> /// <returns>A Hydrated SubjectofCare</returns> public static IParticipationSubjectOfCare PopulateSubjectofCare(bool mandatoryOnly) { var subjectOfCare = BaseCDAModel.CreateSubjectOfCare(); var participant = BaseCDAModel.CreateParticipantForSubjectOfCare(); // Subject of Care > Participant > Person or Organisation or Device > Person var person = BaseCDAModel.CreatePersonForSubjectOfCare(); // Subject of Care > Participant > Entity Identifier person.Identifiers = new List <Identifier> { BaseCDAModel.CreateHealthIdentifier(HealthIdentifierType.IHI, "8003604444567894"), BaseCDAModel.CreateMedicalRecordNumber("123456", "1.2.3.4", "Croydon GP Centre"), // NOTE : ONLY 11 digit Individual Medicare Card Number's is permitted in the Entity Identifier BaseCDAModel.CreateMedicareNumber(MedicareNumberType.IndividualMedicareCardNumber, "59501704511"), BaseCDAModel.CreateIdentifier ( "Test Authority", HealthcareIdentifierGeographicArea.StateOrTerritoryIdentifier, "457456", "1.22.333.444.55555", BaseCDAModel.CreateCodableText("1.1.1.1.1.1", CodingSystem.NCTIS, "DisplayName", "Original Text", null) ) }; // Subject of Care > Participant > Person or Organisation or Device > Person > Person Name var name1 = BaseCDAModel.CreatePersonName(); name1.FamilyName = "Grant"; name1.GivenNames = new List <string> { "Sally", "Wally" }; name1.Titles = new List <string> { "Miss" }; name1.NameUsages = new List <NameUsage> { NameUsage.Legal }; var name2 = BaseCDAModel.CreatePersonName(); name2.FamilyName = "Grant"; name2.GivenNames = new List <string> { "Wally" }; name2.Titles = new List <string> { "Mrs" }; name2.NameUsages = new List <NameUsage> { NameUsage.NewbornName }; person.PersonNames = new List <IPersonName> { name1, name2 }; // Subject of Care > Participant > Person or Organisation or Device > Person > Demographic Data > Indigenous Status person.IndigenousStatus = IndigenousStatus.NeitherAboriginalNorTorresStraitIslanderOrigin; // Subject of Care > Participant > Person or Organisation or Device > Person > Demographic Data > Indigenous Status person.Gender = Gender.Female; // Subject of Care > Participant > Person or Organisation or Device > Person > Demographic Data > Date of Birth Detail > // Date of Birth person.DateOfBirth = new ISO8601DateTime(DateTime.Now.AddYears(-57)); if (!mandatoryOnly) { // Subject of Care > Participant > Person or Organisation or Device > Person > Demographic Data > Sex person.Gender = Gender.Female; // Subject of Care > Participant > Person or Organisation or Device > Person > Demographic Data > Age Detail -> Age person.Age = 54; // Subject of Care > Participant > Electronic Communication Detail var coms1 = BaseCDAModel.CreateElectronicCommunicationDetail( "0345754566", ElectronicCommunicationMedium.Telephone, ElectronicCommunicationUsage.WorkPlace); var coms2 = BaseCDAModel.CreateElectronicCommunicationDetail( "*****@*****.**", ElectronicCommunicationMedium.Email, ElectronicCommunicationUsage.WorkPlace); participant.ElectronicCommunicationDetails = new List <ElectronicCommunicationDetail> { coms1, coms2 }; // Subject of Care > Participant > Address var address1 = BaseCDAModel.CreateAddress(); address1.AddressPurpose = AddressPurpose.Residential; address1.AustralianAddress = BaseCDAModel.CreateAustralianAddress(); var address2 = BaseCDAModel.CreateAddress(); address2.AddressPurpose = AddressPurpose.TemporaryAccommodation; address2.InternationalAddress = BaseCDAModel.CreateInternationalAddress(); participant.Addresses = new List <IAddress> { address1, address2 }; address1.AustralianAddress.UnstructuredAddressLines = new List <string> { "1 Clinician Street" }; address1.AustralianAddress.SuburbTownLocality = "Nehtaville"; address1.AustralianAddress.State = AustralianState.NSW; address1.AustralianAddress.PostCode = "5555"; address2.InternationalAddress.AddressLine = new List <string> { "1 Overseas Street" }; address2.InternationalAddress.Country = Country.NewCaledonia; address2.InternationalAddress.PostCode = "12345"; address2.InternationalAddress.StateProvince = "Foreign Land"; person.DateOfBirthCalculatedFromAge = true; person.DateOfBirthAccuracyIndicator = new DateAccuracyIndicator(true, true, true); person.AgeAccuracyIndicator = true; person.BirthPlurality = 3; person.BirthOrder = 2; person.DateOfDeath = new ISO8601DateTime(DateTime.Now, ISO8601DateTime.Precision.Day); person.DateOfDeathAccuracyIndicator = new DateAccuracyIndicator(true, true, true); person.CountryOfBirth = Country.Australia; person.StateOfBirth = AustralianState.QLD; // Subject of Care > Participant > Entitle-ment var entitlement1 = BaseCDAModel.CreateEntitlement(); entitlement1.Id = BaseCDAModel.CreateMedicareNumber(MedicareNumberType.MedicareCardNumber, "1234567881"); entitlement1.Type = EntitlementType.MedicareBenefits; entitlement1.ValidityDuration = BaseCDAModel.CreateInterval("1", TimeUnitOfMeasure.Year); var entitlement2 = BaseCDAModel.CreateEntitlement(); entitlement2.Id = BaseCDAModel.CreateMedicareNumber(MedicareNumberType.MedicareCardNumber, "2244567891"); entitlement2.Type = EntitlementType.MedicareBenefits; entitlement2.ValidityDuration = BaseCDAModel.CreateInterval("1", TimeUnitOfMeasure.Year); var mothersOriginalFamilyName = BaseCDAModel.CreatePersonName(); mothersOriginalFamilyName.FamilyName = "Jones"; // Subject of Care > Participant > Person or Organisation or Device > Person > Mothers Original Family Name person.MothersOriginalFamilyName = mothersOriginalFamilyName; participant.Entitlements = new List <Entitlement> { entitlement1, entitlement2 }; } participant.Person = person; subjectOfCare.Participant = participant; return(subjectOfCare); }
/// <summary> /// Creates and Hydrates a list of recipients /// Note: the data used within this method is intended as a guide and should be replaced. /// </summary> /// <returns>A Hydrated list of recipients</returns> public static void HydrateRecipient(IParticipationInformationRecipient recipient, RecipientType recipientType, bool mandatoryOnly) { recipient.Participant = BaseCDAModel.CreateParticipantForInformationRecipient(); // informationRecipient/@typeCode recipient.Participant.RecipientType = recipientType; // informationRecipient/intendedRecipient recipient.Participant.Person = BaseCDAModel.CreatePerson(); if (!mandatoryOnly) { // informationRecipient/intendedRecipient/informationRecipient/<Entity Identifier> recipient.Participant.Person.Identifiers = new List <Identifier> { BaseCDAModel.CreateIdentifier("SampleAuthority", null, null, "1.2.3.4.5.6677", null), BaseCDAModel.CreateHealthIdentifier(HealthIdentifierType.HPII, "8003614444567893") }; // informationRecipient/intendedRecipient/<Address> var address1 = BaseCDAModel.CreateAddress(); address1.AddressPurpose = AddressPurpose.Residential; address1.AustralianAddress = BaseCDAModel.CreateAustralianAddress(); address1.AustralianAddress.UnstructuredAddressLines = new List <string> { "1 Clinician Street" }; address1.AustralianAddress.SuburbTownLocality = "Nehtaville"; address1.AustralianAddress.State = AustralianState.QLD; address1.AustralianAddress.PostCode = "5555"; address1.AustralianAddress.DeliveryPointId = 32568931; var address2 = BaseCDAModel.CreateAddress(); address2.AddressPurpose = AddressPurpose.TemporaryAccommodation; address2.InternationalAddress = BaseCDAModel.CreateInternationalAddress(); address2.InternationalAddress.AddressLine = new List <string> { "1 Overseas Street" }; address2.InternationalAddress.Country = Country.Albania; address2.InternationalAddress.PostCode = "12345"; address2.InternationalAddress.StateProvince = "Foreign Land"; var addressList = new List <IAddress> { address1, address2 }; recipient.Participant.Addresses = addressList; // informationRecipient/intendedRecipient/<Electronic Communication Detail> var coms1 = BaseCDAModel.CreateElectronicCommunicationDetail( "0345754566", ElectronicCommunicationMedium.Telephone, ElectronicCommunicationUsage.WorkPlace); var coms2 = BaseCDAModel.CreateElectronicCommunicationDetail( "*****@*****.**", ElectronicCommunicationMedium.Email, ElectronicCommunicationUsage.WorkPlace); recipient.Participant.ElectronicCommunicationDetails = new List <ElectronicCommunicationDetail> { coms1, coms2 }; // informationRecipient/intendedRecipient/informationRecipient/<Person Name> var name1 = BaseCDAModel.CreatePersonName(); name1.GivenNames = new List <string> { "Information" }; name1.FamilyName = "Recipient"; name1.Titles = new List <string> { "Doctor" }; name1.NameUsages = new List <NameUsage> { NameUsage.Legal }; var name2 = BaseCDAModel.CreatePersonName(); name2.GivenNames = new List <string> { "Information" }; name2.FamilyName = "Recipient"; name2.Titles = new List <string> { "Mr" }; name2.NameUsages = new List <NameUsage> { NameUsage.NewbornName }; recipient.Participant.Person.PersonNames = new List <IPersonName> { name1, name2 }; // informationRecipient/intendedRecipient/receivedOrganization recipient.Participant.Organisation = BaseCDAModel.CreateOrganisationName(); // informationRecipient/intendedRecipient/receivedOrganization/name recipient.Participant.Organisation.Name = "Specialist Clinics"; recipient.Participant.Organisation.Identifiers = new List <Identifier> { BaseCDAModel.CreateIdentifier("SampleAuthority", null, null, "1.2.3.4.5.6677", null), BaseCDAModel.CreateHealthIdentifier(HealthIdentifierType.HPIO, "8003621231167886") }; } }
/// <summary> /// Creates and Hydrates an Authenticator /// Note: the data used within this method is intended as a guide and should be replaced. /// </summary> /// <returns>A Hydrated authenticator</returns> public static void HydrateAuthenticator(IParticipationLegalAuthenticator authenticator, bool mandatoryOnly) { // LegalAuthenticator/assignedEntity authenticator.Participant = BaseCDAModel.CreateParticipantForLegalAuthenticator(); // LegalAuthenticator/assignedEntity/assignedPerson authenticator.Participant.Person = BaseCDAModel.CreatePerson(); // LegalAuthenticator/time/@value authenticator.Participant.DateTimeAuthenticated = new ISO8601DateTime(DateTime.Now, ISO8601DateTime.Precision.Second); //LegalAuthenticator/assignedEntity/assignedPerson/<Person Name> var name1 = BaseCDAModel.CreatePersonName(); name1.GivenNames = new List <string> { "Fitun" }; name1.FamilyName = "Healthy"; name1.Titles = new List <string> { "Dr" }; name1.NameUsages = new List <NameUsage> { NameUsage.Legal }; authenticator.Participant.Person.PersonNames = new List <IPersonName> { name1 }; // LegalAuthenticator/assignedEntity/<Entity Identifier> authenticator.Participant.Person.Identifiers = new List <Identifier> { BaseCDAModel.CreateHealthIdentifier(HealthIdentifierType.HPII, "8003615833334118") }; if (!mandatoryOnly) { // LegalAuthenticator/assignedEntity/code authenticator.Role = BaseCDAModel.CreateRole(Occupation.Pathologist, CodingSystem.ANZSCORevision1); // LegalAuthenticator/assignedEntity/<Address> var address1 = BaseCDAModel.CreateAddress(); address1.AddressPurpose = AddressPurpose.Business; address1.AustralianAddress = BaseCDAModel.CreateAustralianAddress(); address1.AustralianAddress.UnstructuredAddressLines = new List <string> { "1 Clinician Street" }; address1.AustralianAddress.SuburbTownLocality = "Nehtaville"; address1.AustralianAddress.State = AustralianState.QLD; address1.AustralianAddress.PostCode = "5555"; var address2 = BaseCDAModel.CreateAddress(); address2.AddressPurpose = AddressPurpose.Business; address2.InternationalAddress = BaseCDAModel.CreateInternationalAddress(); address2.InternationalAddress.AddressLine = new List <string> { "1 Overseas Street" }; address2.InternationalAddress.Country = Country.Albania; address2.InternationalAddress.PostCode = "12345"; address2.InternationalAddress.StateProvince = "Foreign Land"; var addressList = new List <IAddress> { address1, address2 }; authenticator.Participant.Addresses = addressList; // LegalAuthenticator/assignedEntity/<Electronic Communication Detail> var coms1 = BaseCDAModel.CreateElectronicCommunicationDetail( "0345754566", ElectronicCommunicationMedium.Telephone, ElectronicCommunicationUsage.WorkPlace); var coms2 = BaseCDAModel.CreateElectronicCommunicationDetail( "*****@*****.**", ElectronicCommunicationMedium.Email, ElectronicCommunicationUsage.WorkPlace); authenticator.Participant.ElectronicCommunicationDetails = new List <ElectronicCommunicationDetail> { coms1, coms2 }; // LegalAuthenticator/assignedEntity/representedOrganization authenticator.Participant.Organisation = BaseCDAModel.CreateOrganisationName(); // LegalAuthenticator/assignedEntity/representedOrganization/name authenticator.Participant.Organisation.Name = "Oz Health Clinic"; // LegalAuthenticator/assignedEntity/representedOrganization/<Entity Identifier> authenticator.Participant.Organisation.Identifiers = new List <Identifier> { BaseCDAModel.CreateIdentifier("Test Authority", null, null, "2.999.1234567890", null), BaseCDAModel.CreateHealthIdentifier(HealthIdentifierType.HPIO, "8003620000001144") }; } }