public void TestDelete2() { // Invalid type var pr = new PatientRole(); pr.Id.Append(); pr.Id.Delete(pr); }
private PatientRole CreatePatientRole() { PatientRole patientRole = new PatientRole(); patientRole.Id.Add(new Identifier("2.16.840.1.113883.19.5.99999.2", "998991")); patientRole.Addr.Add(CreateAddress("1357 Amber Drive", "Beaverton", "OR", "97867", "US")); patientRole.Telecom.Add(CreateTelecom("(816)276-6909", Ca.Infoway.Messagebuilder.Domainvalue.Basic.TelecommunicationAddressUse.PRIMARY_HOME)); patientRole.Patient = CreatePatient(); return(patientRole); }
public void TestDelete() { var pr = new PatientRole(); for (var i = 0; i < 100; i++) { var ii = new II(); ii.Root = i.ToString(); ii.Extension = i.ToString(); pr.Id.Add(ii); } TestContext.WriteLine("Count: {0}", pr.Id.Count); foreach (var x in pr.Id) { pr.Id.Delete(x); } TestContext.WriteLine("Count: {0}", pr.Id.Count); for (var i = 0; i < 100; i++) { var ii = new II(); ii.Root = i.ToString(); ii.Extension = i.ToString(); pr.Id.Add(ii); } TestContext.WriteLine("Count: {0}", pr.Id.Count); pr.Id.Delete(99); pr.Id.Delete(50); pr.Id.Delete(0); TestContext.WriteLine("Count: {0}", pr.Id.Count); }
private static void MakePatientRoleNode(RecordTarget rt) { PatientRole pr = new PatientRole(); //CONF 5268 pr.Id = new SET<II>(new II( "2.16.840.1.113883.4.1", //Patient SSN recorded as an ID "123-456-7890")); //CONF 5271 pr.Addr = new SET<AD>( new AD(new CS<PostalAddressUse>(PostalAddressUse.PrimaryHome), new ADXP[]{ new ADXP("100 Marshall Lane", AddressPartType.StreetAddressLine), new ADXP("Springfield", AddressPartType.City), new ADXP("VA", AddressPartType.State), new ADXP("22153", AddressPartType.PostalCode), new ADXP("US", AddressPartType.Country)})); //CONF 5280 pr.Telecom = new SET<TEL>( new TEL( "tel:+1(571)555-0189", TelecommunicationAddressUse.PrimaryHome)); //CONF 5283 MakePatientNode(pr); rt.PatientRole = pr; }
private static void MakePatientNode(PatientRole pr) { //Patient p = new Patient(); MyPatientMultipleRaceCodes p = new MyPatientMultipleRaceCodes(); //CONF 5284 //L is "Legal" from HL7 EntityNameUse 2.16.840.1.113883.5.45 //p.Name = new SET<PN>(); //p.Name.Add(new PN(EntityNameUse.Legal, // new ENXP("Nikolai", EntityNamePartType.Given))); //p.Name.Add(new PN(EntityNameUse.Legal, // new ENXP("Bellic", EntityNamePartType.Family))); p.Name = new SET<PN>( new PN( new List<ENXP>{ new ENXP("Nikolai", EntityNamePartType.Given), new ENXP("Bellic", EntityNamePartType.Family)})); p.AdministrativeGenderCode = new CE<string>("M", "2.16.840.1.113883.5.1", "AdministrativeGender", null, "Male", null); p.BirthTime = DateTime.Now; p.MaritalStatusCode = new CE<string>("M", "2.16.840.1.113883.5.2", "MaritalStatus", null, "Married", null); p.ReligiousAffiliationCode = new CE<string>("1041", "2.16.840.1.113883.5.1076", "ReligiousAffiliation", null, "Roman Catholic", null); //p.RaceCode = new CE<string>("2106-3", // "2.16.840.1.113883.6.238", // "OMB Standards for Race and Ethnicity", // null, // "White", // null); p.RaceCode = new SET<CE<string>>(); p.RaceCode.Add( new CE<string>("2106-3", "2.16.840.1.113883.6.238", "OMB Standards for Race and Ethnicity", null, "White", null)); p.RaceCode.Add( new CE<string>("2131-1", "2.16.840.1.113883.6.238", "Test", null, "Other Race", null)); p.EthnicGroupCode = new CE<string>("2186-5", "2.16.840.1.113883.6.238", "OMB Standards for Race and Ethnicity", null, "Not Hispanic or Latino", null); //CONF 5407: LanguageCode Code System 2.16.840.1.113883.1.11.11526 p.LanguageCommunication.Add( new LanguageCommunication( new CS<String>("eng"), new CE<string>("ESP", "2.16.840.1.113883.5.60", "LanguageAbilityMode", null, "Expressed spoken", null), null, null)); pr.Patient = p; }