public AnimalPatient() { this.patientAnimalName = new STImpl(); this.patientAnimalContactPartyAddr = new ADImpl(); this.patientAnimalContactPartyTelecom = new SETImpl <TEL, TelecommunicationAddress>(typeof(TELImpl)); this.patientAnimalContactPartyContactPersonName = new PNImpl(); }
private void match(string query, string template) { Change_Resolution(query); Change_Resolution(template); // Loading fingerprints var fingerprintImg1 = ImageLoader.LoadImage(query); var fingerprintImg2 = ImageLoader.LoadImage(template); //// Building feature extractor and extracting features var featExtractor = new PNFeatureExtractor() { MtiaExtractor = new Ratha1995MinutiaeExtractor() }; var features1 = featExtractor.ExtractFeatures(fingerprintImg1); var features2 = featExtractor.ExtractFeatures(fingerprintImg2); // Building matcher and matching var matcher = new PN(); double similarity = matcher.Match(features1, features2); score = similarity.ToString("0.000"); MessageBox.Show(similarity.ToString("0.000")); if (similarity >= 70) { MessageBox.Show("True"); } else { MessageBox.Show("False"); } }
public void R2PNQualifierSerializationTest() { PN inti = new PN( EntityNameUse.Legal, new ENXP[] { new ENXP("Sir", EntityNamePartType.Prefix) { Qualifier = new SET <CS <EntityNamePartQualifier> >(EntityNamePartQualifier.Nobility) }, new ENXP("Dr", EntityNamePartType.Prefix) { Qualifier = new SET <CS <EntityNamePartQualifier> >(EntityNamePartQualifier.Academic) }, new ENXP("John", EntityNamePartType.Given), new ENXP("Jacob", EntityNamePartType.Given), new ENXP("Jingleheimer", EntityNamePartType.Family), new ENXP("-", EntityNamePartType.Delimiter), new ENXP("Schmidt", EntityNamePartType.Family), new ENXP("III", EntityNamePartType.Suffix) } ); inti.Use.Add(EntityNameUse.OfficialRecord); string expectedXml = @"<test xmlns=""urn:hl7-org:v3"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" use=""L OR"" flavorId=""EN.PN""><part type=""TITLE"" value=""Sir"" qualifier=""NB PFX""/><part type=""TITLE"" value=""Dr"" qualifier=""AC PFX""/><part type=""GIV"" value=""John""/><part type=""GIV"" value=""Jacob""/><part type=""FAM"" value=""Jingleheimer""/><part type=""DEL"" value=""-""/><part type=""FAM"" value=""Schmidt""/><part qualifier=""SFX"" value=""III""/></test>"; string actualXml = R2SerializationHelper.SerializeAsString(inti); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
public ContactParty() { this.id = new IIImpl(); this.code = new CVImpl(); this.contactCallBackPersonName = new PNImpl(); this.contactCallBackPersonTelecom = new SETImpl <TEL, TelecommunicationAddress>(typeof(TELImpl)); }
public HealthcareWorker() { this.id = new LISTImpl<II, Identifier>(typeof(IIImpl)); this.code = new CVImpl(); this.telecom = new LISTImpl<TEL, TelecommunicationAddress>(typeof(TELImpl)); this.assignedPersonName = new PNImpl(); this.assignedPersonAsHealthCareProviderId = new IIImpl(); }
public PatientForecastQueryParameters() { this.patientBirthDateValue = new TSImpl(); this.patientGenderValue = new CVImpl(); this.patientIDValue = new IIImpl(); this.patientNameValue = new PNImpl(); }
public void DrawPlayingNotes(Graphics g) { foreach (PlayingNote PN in playingNotes) { PN.DrawPlayingNote(g); } }
private void match(string query, string template) { Change_Resolution(query); Change_Resolution(template); // Loading fingerprints var fingerprintImg1 = ImageLoader.LoadImage(query); var fingerprintImg2 = ImageLoader.LoadImage(template); //// Building feature extractor and extracting features var featExtractor = new PNFeatureExtractor() { MtiaExtractor = new Ratha1995MinutiaeExtractor() }; var features1 = featExtractor.ExtractFeatures(fingerprintImg1); var features2 = featExtractor.ExtractFeatures(fingerprintImg2); // Building matcher and matching var matcher = new PN(); double similarity = matcher.Match(features1, features2); score = similarity.ToString("0.00"); string per = "percent"; label1.Text = similarity.ToString("0.00"); label3.Visible = true; }
public Provider() { this.id = new IIImpl(); this.code = new CVImpl(); this.representedPersonName = new PNImpl(); this.representedPersonAsLicensedEntityId = new IIImpl(); }
private void match(string query, string template) { Change_Resolution(query); Change_Resolution(template); var fingerprintImg1 = ImageLoader.LoadImage(query); var fingerprintImg2 = ImageLoader.LoadImage(template); var featExtractor = new PNFeatureExtractor() { MtiaExtractor = new Ratha1995MinutiaeExtractor() }; var features1 = featExtractor.ExtractFeatures(fingerprintImg1); var features2 = featExtractor.ExtractFeatures(fingerprintImg2); var matcher = new PN(); double similarity = matcher.Match(features1, features2); score = similarity.ToString("0.000"); Console.WriteLine("the matched score is {0}", score); if (similarity > 70) { MessageBox.Show("Its a Match !!", "Result", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); } else { MessageBox.Show("Unsuccessfull !!", "Result", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
public Patient() { this.id = new IIImpl(); this.patientPersonName = new PNImpl(); this.patientPersonAdministrativeGenderCode = new CVImpl(); this.patientPersonBirthTime = new TSImpl(); }
/// <summary> /// Create client component /// </summary> public Client CreateClientComponent(MARC.Everest.RMIM.CA.R020403.COCT_MT050207CA.Patient patient, List <IResultDetail> dtls) { // Patient is null if (patient == null || patient.NullFlavor != null) { dtls.Add(new MandatoryElementMissingResultDetail(ResultDetailType.Error, this.m_localeService.GetString("MSGE028"), null)); return(null); } Client retVal = new Client(); // Resolve id if (patient.Id == null || patient.Id.NullFlavor != null || patient.Id.IsEmpty || patient.Id.Count(o => o.Use == IdentifierUse.Business) == 0) { dtls.Add(new ResultDetail(ResultDetailType.Error, this.m_localeService.GetString("MSGE029"), null, null)); return(null); } // Alternative identifiers retVal.AlternateIdentifiers.AddRange(CreateDomainIdentifierList(patient.Id, dtls)); // Client Legal Name PN legalName = patient.PatientPerson.Name; if (legalName == null || legalName.IsNull) { dtls.Add(new ResultDetail(ResultDetailType.Warning, this.m_localeService.GetString("MSGE02A"), null, null)); } else { retVal.LegalName = CreateNameSet(legalName, dtls); } // Client telecom if (patient.Telecom != null && !patient.Telecom.IsNull) { foreach (TEL tel in patient.Telecom) { retVal.TelecomAddresses.Add(new TelecommunicationsAddress() { Value = tel.Value, Use = tel.Use == null ? null : Util.ToWireFormat(tel.Use) }); } } AD addr = patient.Addr; if (addr != null && !addr.IsNull) { retVal.PerminantAddress = CreateAddressSet(addr, dtls); } return(retVal); }
public Patient() { this.id = new SETImpl <II, Identifier>(typeof(IIImpl)); this.patientPersonName = new PNImpl(); this.patientPersonAdministrativeGenderCode = new CVImpl(); this.patientPersonBirthTime = new TSImpl(); }
public void R2PNQualifierParseTest() { PN inti = new PN( EntityNameUse.Legal, new ENXP[] { new ENXP("Sir", EntityNamePartType.Title) { Qualifier = new SET <CS <EntityNamePartQualifier> >(new EntityNamePartQualifier[] { EntityNamePartQualifier.Nobility, EntityNamePartQualifier.Acquired }) }, new ENXP("Dr", EntityNamePartType.Title) { Qualifier = new SET <CS <EntityNamePartQualifier> >(EntityNamePartQualifier.Academic) }, new ENXP("John", EntityNamePartType.Given), new ENXP("Jacob", EntityNamePartType.Given), new ENXP("Jingleheimer", EntityNamePartType.Family), new ENXP("-", EntityNamePartType.Delimiter), new ENXP("Schmidt", EntityNamePartType.Family), new ENXP("III") } ) { Flavor = "EN.PN" }; string actualXml = R2SerializationHelper.SerializeAsString(inti); var int2 = R2SerializationHelper.ParseString <PN>(actualXml); Assert.AreEqual(inti, int2); }
/// <summary> /// Parse an instance from <paramref name="s"/> /// </summary> /// <param name="s">The stream to parse from</param> /// <returns>The parsed object</returns> public override object Parse(System.Xml.XmlReader s, DatatypeFormatterParseResult result) { // Parse PN retVal = base.Parse <PN>(s, result); return(retVal); }
public result match(string query, string template) { Change_Resolution(query); Change_Resolution(template); // Loading fingerprints var fingerprintImg1 = ImageLoader.LoadImage(query); var fingerprintImg2 = ImageLoader.LoadImage(template); //// Building feature extractor and extracting features var featExtractor = new PNFeatureExtractor() { MtiaExtractor = new Ratha1995MinutiaeExtractor() }; var features1 = featExtractor.ExtractFeatures(fingerprintImg1); var features2 = featExtractor.ExtractFeatures(fingerprintImg2); // Building matcher and matching var matcher = new PN(); double similarity = matcher.Match(features1, features2); score = similarity.ToString("0.00"); result.accuracy = score; if (similarity > 75.0) { result.Code = 0; result.Message = "Matched"; } else { result.Code = 2; result.Message = "Not Matched"; } return(result); }
public MedicationProfileGenericQueryParameters() { this.administrationEffectivePeriodValue = new IVLImpl <TS, Interval <PlatformDate> >(); this.amendedInTimeRangeValue = new IVLImpl <TS, Interval <PlatformDate> >(); this.diagnosisCodeValue = new CVImpl(); this.drugCodeValue = new CVImpl(); this.includeEventHistoryIndicatorValue = new BLImpl(); this.includeIssuesIndicatorValue = new BLImpl(); this.includeNotesIndicatorValue = new BLImpl(); this.includePendingChangesIndicatorValue = new BLImpl(); this.issueFilterCodeValue = new CVImpl(); this.mostRecentByDrugIndicatorValue = new BLImpl(); this.mostRecentDispenseForEachRxIndicatorValue = new BLImpl(); this.otherIndicationCodeValue = new CVImpl(); this.otherMedicationRecordIdValue = new IIImpl(); this.patientBirthDateValue = new TSImpl(); this.patientGenderValue = new CVImpl(); this.patientIDValue = new IIImpl(); this.patientNameValue = new PNImpl(); this.prescriberProviderIDValue = new IIImpl(); this.prescriptionDispenseNumberValue = new IIImpl(); this.prescriptionOrderNumberValue = new IIImpl(); this.prescriptionStatusValue = new List <CV>(); this.rxDispenseIndicatorValue = new List <CV>(); this.symptomCodeValue = new CVImpl(); this.treatmentTypeValue = new List <CV>(); }
public void PNNullTest() { PN pn = new PN(); pn.Part.Clear(); pn.NullFlavor = null; Assert.IsFalse(pn.Validate()); }
public HealthcareWorker() { this.id = new SETImpl <II, Identifier>(typeof(IIImpl)); this.assignedPersonName = new PNImpl(); this.assignedPersonAsHealthCareProviderId = new IIImpl(); this.representedOrganizationId = new IIImpl(); this.representedOrganizationName = new STImpl(); }
public void PNPartTest() { PN pn = new PN(); pn.Part.Add(new ENXP("Andria")); pn.NullFlavor = null; Assert.IsTrue(pn.Validate()); }
public ResponsiblePerson() { this.id = new IIImpl(); this.code = new CVImpl(); this.addr = new ADImpl(); this.telecom = new SETImpl <TEL, TelecommunicationAddress>(typeof(TELImpl)); this.agentPersonName = new PNImpl(); }
internal e_patient(string classCode, string determinerCode) : base(classCode) { base.ClassCode = classCode; base.DeterminerCode = determinerCode; Name = new PN(); }
public void PNNullFlavorTest() { PN pn = new PN(); pn.Part.Clear(); pn.NullFlavor = NullFlavor.NotAsked; Assert.IsTrue(pn.Validate()); }
public HealthcareWorker() { this.id = new IIImpl(); this.assignedPersonName = new PNImpl(); this.assignedPersonAsHealthCareProviderId = new IIImpl(); this.representedOrganizationId = new IIImpl(); this.representedOrganizationName = new STImpl(); }
internal e_patient(string classCode, string determinerCode) : base(classCode) { base.ClassCode = classCode; base.DeterminerCode = determinerCode; Name = new PN(); }
public ConditionHistoryQueryParameters() { this.conditionIDValue = new IIImpl(); this.patientBirthDateValue = new TSImpl(); this.patientGenderValue = new CVImpl(); this.patientIDValue = new IIImpl(); this.patientNameValue = new PNImpl(); }
public PayeePerson() { this.name = new PNImpl(); this.addr = new ADImpl(); this.payeeLanguageLanguageCode = new CVImpl(); this.payeeLanguageModeCode = new CVImpl(); this.payeeLanguagePreferenceInd = new BLImpl(); }
public ImmunizationQueryParameters() { this.immunizationEventIDValue = new IIImpl(); this.patientBirthDateValue = new TSImpl(); this.patientGenderValue = new CVImpl(); this.patientIDValue = new SETImpl <II, Identifier>(typeof(IIImpl)); this.patientNameValue = new PNImpl(); }
public ParameterList() { this.coveredPartyDOBValue = new TSImpl(); this.coveredPartyGenderValue = new CVImpl(); this.coveredPartyNameValue = new PNImpl(); this.policyIdentifierValue = new IIImpl(); this.specialAuthorizationRequestIDValue = new IIImpl(); }
public RelatedPerson() { this.id = new IIImpl(); this.code = new CVImpl(); this.relationshipHolderName = new PNImpl(); this.relationshipHolderTelecom = new SETImpl <TEL, TelecommunicationAddress>(typeof(TELImpl)); this.relationshipHolderAddr = new ADImpl(); }
public GenericQueryParameters() { this.drugCodeValue = new CVImpl(); this.patientBirthDateValue = new TSImpl(); this.patientGenderValue = new CVImpl(); this.patientIDValue = new IIImpl(); this.patientNameValue = new PNImpl(); }
private static void PlayBatchNet(long[, ,] times, int sizeIdx, int iteration, SynchronizationsImplementation.AutomataToNet startRule, Stopwatch watch, ref PN.PetriNet batchNet, ref FSM.FiniteStateMachine batchMachine, List<FSMWorkloadAction> workload) { watch.Restart(); foreach (var item in workload) { item.Perform(batchMachine); RerunBatchSynchronization(startRule, ref batchNet, ref batchMachine); } watch.Stop(); times[sizeIdx, iteration, 4] = watch.ElapsedTicks; }
public void PNNullTest() { PN pn = new PN(); pn.Part.Clear(); pn.NullFlavor = null; Assert.IsFalse(pn.Validate()); }
internal void SetName(string value) { name = new List<PN>(); PN thisname = new PN(); thisname.Part.Add(new ENXP(value)); name.Add(thisname); }
static void Main(string[] args) { // This layer of the Everest Framework maps 1:1 with the underlying HL7v3 structures, so it requires a detailed understanding of HL7v3 // This example shows some of the Mohawk Everest Framework features, such as: // // - overloaded constructors // - structural validation // - vocabulary support with enumerations // - smart datatype support with helper methods // - intellisense support including MIF documentation pass-thru // - built-in XML ITS formatting // - and other features (see API documentation) // // Higher levels of an API Framework would provide abstraction from these message details // // Create a client registry "find candidates query" message structure using the required parameters constructor // This constructor looks complicated at first, but it ensures that all required elements are present in the message structure PRPA_IN101103CA FindCandidatesStructure = new PRPA_IN101103CA( // use the required elements version of the constructor new MARC.Everest.DataTypes.II(new Guid("6AE2BD87-332A-3B99-4EAD-FAF9CE012843")), // message id new DateTime(2009, 03, 14, 19, 58, 55, 218), ResponseMode.Immediate, // response mode selected from enumeration new MARC.Everest.DataTypes.II("2.16.840.1.113883.1.18", "PRPA_IN101103CA"), // interaction id new MARC.Everest.DataTypes.LIST<II>() { new MARC.Everest.DataTypes.II("2.16.840.1.113883.2.20.2", "R02.04.00") }, // profileID new CS<ProcessingID>(ProcessingID.Debugging), // processing ID code new CS<AcknowledgementCondition>(AcknowledgementCondition.Never), // ack type new MARC.Everest.RMIM.CA.R020401.MCCI_MT002300CA.Receiver( new MARC.Everest.RMIM.CA.R020401.MCCI_MT002300CA.Device2(new II("2.16.840.1.113883.19.3.297.15.37.0.47", "DIS01"))), new MARC.Everest.RMIM.CA.R020401.MCCI_MT002300CA.Sender( new MARC.Everest.RMIM.CA.R020401.MCCI_MT002300CA.Device1(new II("2.16.840.1.113883.19.3.207.15.1.0.3", "DIS01")))); // prepare a coded value representing the trigger event - this will be attached to the control act event CV<String> triggerevent = new CV<String>() { Code = "PRPA_TE101103CA", CodeSystem = "2.16.840.1.113883.1.18" }; // Create the control act event required for this message and attach it to the structure // Since this is a "Query" interaction type, we create a QueryByParameter structure and attach it to the control act // We will later fill in this query block with our specific parameters FindCandidatesStructure.controlActEvent = PRPA_IN101103CA.CreateControlActEvent( new II("2.16.840.1.113883.19.3.207.15.1.1", "0245285594892"), triggerevent, new MARC.Everest.RMIM.CA.R020401.MFMI_MT700751CA.Author(new TS(DateTime.Parse("2009-03-14 19:58:55.218"))), new MARC.Everest.RMIM.CA.R020401.MFMI_MT700746CA.QueryByParameter<MARC.Everest.RMIM.CA.R020401.PRPA_MT101103CA.ParameterList>( II.CreateToken(Guid.NewGuid()), new MARC.Everest.RMIM.CA.R020401.PRPA_MT101103CA.ParameterList() )); // add the name to search for and attach it to the parameter list List<ENXP> namelist = new List<ENXP>(); namelist.Add(new ENXP("Nuclear", EntityNamePartType.Family)); namelist.Add(new ENXP("Nancy", EntityNamePartType.Given)); PN pn1 = new PN(namelist); MARC.Everest.RMIM.CA.R020401.PRPA_MT101103CA.PersonName persname = new MARC.Everest.RMIM.CA.R020401.PRPA_MT101103CA.PersonName(pn1); // notice we use .Add() to attach a name to the parameter list - this is due to the fact that a person name is actually a list of names FindCandidatesStructure.controlActEvent.QueryByParameter.parameterList.PersonName.Add(persname); // add the birthday to search for and add it to the parameter list TS birthdate = new TS(new DateTime(1990, 1, 1)); MARC.Everest.RMIM.CA.R020401.PRPA_MT101103CA.PersonBirthtime pbt = new MARC.Everest.RMIM.CA.R020401.PRPA_MT101103CA.PersonBirthtime(birthdate); // notice we use assignment to attach the populated object pdt (no .Add() method as above since it is a simple object -- see PersonName.Add() for contrasting example) FindCandidatesStructure.controlActEvent.QueryByParameter.parameterList.PersonBirthtime = pbt; FindCandidatesStructure.controlActEvent.LanguageCode = new CE<string>() { NullFlavor = MARC.Everest.DataTypes.NullFlavor.AskedUnknown }; // Create an XML formatter XmlIts1Formatter its1Formatter = new XmlIts1Formatter(); // Add the datatypes R1 graph aide its1Formatter.GraphAides.Add(new DatatypeFormatter()); // Check the structure for conformance by forcing the formatter to render to a memory stream // Result.Code will then indicate if the message is conformant var Result = its1Formatter.Graph(new MemoryStream(), FindCandidatesStructure); if (Result.Code == MARC.Everest.Connectors.ResultCode.AcceptedNonConformant) { // we have a conformant message, so let's save it // print the XML to STDOUT its1Formatter.Graph(Console.OpenStandardOutput(), FindCandidatesStructure); // if we stream it through an XML writer and set the indent property the output will contain line breaks and indentation which makes it much easier to read (not necessaily required for machine-machine transmission) System.Xml.XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; XmlWriter x = XmlWriter.Create(@"PRPA_IN101103CA_Everest.xml", settings); // XmlStateWriter is required here to get around some complicated formatting issues MARC.Everest.Xml.XmlStateWriter sw = new MARC.Everest.Xml.XmlStateWriter(x); its1Formatter.Graph(sw, FindCandidatesStructure); sw.Flush(); } else { Console.WriteLine("Error trying to save structure PRPA_IN101103CA. Formatter response: {0}", Result.Code.ToString()); } Console.WriteLine("Press any key to continue..."); Console.ReadKey(); }
public void PNValidQualifierTest() { PN pn = new PN(); ENXP enxp = new ENXP(); enxp.Value = "Andria"; enxp.Qualifier = new SET<CS<EntityNamePartQualifier>>(EntityNamePartQualifier.Nobility); pn.Part.Add(enxp); pn.NullFlavor = null; Assert.IsTrue(pn.Validate()); }
public void PNInvalidQualifierTest() { PN pn = new PN(); ENXP enxp = new ENXP(); enxp.Value = "Andria"; enxp.Qualifier = new SET<CS<EntityNamePartQualifier>>(EntityNamePartQualifier.LegalStatus); pn.Part.Add(enxp); pn.NullFlavor = null; Assert.IsFalse(pn.Validate()); }
internal void SetNameNull(NullFlavor nullValue) { name = new List<PN>(); PN thisname = new PN(); thisname.NullFlavor = new CS<NullFlavor>(nullValue); name.Add(thisname); }
public void PNNullQualifierTest() { PN pn = new PN(); ENXP enxp = new ENXP(); enxp.Value = "Andria"; enxp.Qualifier = null; pn.Part.Add(enxp); pn.NullFlavor = null; Assert.IsTrue(pn.Validate()); }
internal void AddName(PN value) { if (name == null) { name = new List<PN>(); } name.Add(value); }
public void PNNullFlavorTest() { PN pn = new PN(); pn.Part.Clear(); pn.NullFlavor = NullFlavor.NotAsked; Assert.IsTrue(pn.Validate()); }
private static void RerunBatchSynchronization(SynchronizationsImplementation.AutomataToNet startRule, ref PN.PetriNet batchNet, ref FSM.FiniteStateMachine batchMachine) { batchNet = null; fsm2pnSynchronization.Synchronize(startRule, ref batchMachine, ref batchNet, SynchronizationDirection.LeftToRightForced, ChangePropagationMode.None); }
public void PNPartTest() { PN pn = new PN(); pn.Part.Add(new ENXP("Andria")); pn.NullFlavor = null; Assert.IsTrue(pn.Validate()); }
private static PN.PetriNet RerunTransformation(FSM.FiniteStateMachine fsm, PN.PetriNet transformationsPN) { return TransformationEngine.Transform<FSM.FiniteStateMachine, PN.PetriNet>(fsm, fsm2pnTransformation); }
internal void SetName(PN value) { name = new List<PN>(); name.Add(value); }
private static PN.PetriNet PlayTransformations(long[, ,] times, int sizeIdx, int iteration, FSM.FiniteStateMachine fsm, Stopwatch watch, PN.PetriNet transformationsPN, List<FSMWorkloadAction> workload) { watch.Restart(); foreach (var item in workload) { item.Perform(fsm); transformationsPN = RerunTransformation(fsm, transformationsPN); } watch.Stop(); times[sizeIdx, iteration, 3] = watch.ElapsedTicks; return transformationsPN; }
public void R2PNQualifierSerializationTest() { PN inti = new PN( EntityNameUse.Legal, new ENXP[] { new ENXP("Sir", EntityNamePartType.Prefix) { Qualifier = new SET<CS<EntityNamePartQualifier>>(EntityNamePartQualifier.Nobility) }, new ENXP("Dr", EntityNamePartType.Prefix) { Qualifier = new SET<CS<EntityNamePartQualifier>>(EntityNamePartQualifier.Academic) }, new ENXP("John", EntityNamePartType.Given), new ENXP("Jacob", EntityNamePartType.Given), new ENXP("Jingleheimer", EntityNamePartType.Family), new ENXP("-", EntityNamePartType.Delimiter), new ENXP("Schmidt", EntityNamePartType.Family), new ENXP("III", EntityNamePartType.Suffix) } ); inti.Use.Add(EntityNameUse.OfficialRecord); string expectedXml = @"<test xmlns=""urn:hl7-org:v3"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" use=""L OR"" flavorId=""EN.PN""><part type=""TITLE"" value=""Sir"" qualifier=""NB PFX""/><part type=""TITLE"" value=""Dr"" qualifier=""AC PFX""/><part type=""GIV"" value=""John""/><part type=""GIV"" value=""Jacob""/><part type=""FAM"" value=""Jingleheimer""/><part type=""DEL"" value=""-""/><part type=""FAM"" value=""Schmidt""/><part qualifier=""SFX"" value=""III""/></test>"; string actualXml = R2SerializationHelper.SerializeAsString(inti); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
/// <summary> /// Constructor for the Person Name (PN) Helper class. /// </summary> public PN_Helper() { useIsSet = false; personName = new PN(); unstructuredName = string.Empty; }
public void R2PNQualifierParseTest() { PN inti = new PN( EntityNameUse.Legal, new ENXP[] { new ENXP("Sir", EntityNamePartType.Title) { Qualifier = new SET<CS<EntityNamePartQualifier>>(new EntityNamePartQualifier[] { EntityNamePartQualifier.Nobility, EntityNamePartQualifier.Acquired }) }, new ENXP("Dr", EntityNamePartType.Title) { Qualifier = new SET<CS<EntityNamePartQualifier>>(EntityNamePartQualifier.Academic) }, new ENXP("John", EntityNamePartType.Given), new ENXP("Jacob", EntityNamePartType.Given), new ENXP("Jingleheimer", EntityNamePartType.Family), new ENXP("-", EntityNamePartType.Delimiter), new ENXP("Schmidt", EntityNamePartType.Family), new ENXP("III") } ) { Flavor = "EN.PN" }; string actualXml = R2SerializationHelper.SerializeAsString(inti); var int2 = R2SerializationHelper.ParseString<PN>(actualXml); Assert.AreEqual(inti, int2); }
internal static PN CreatePN(UseContext context) { Tracer.Trace("Creating PN", context); PN result = new PN(); result.Part.Add(new ENXP("McLovin", EntityNamePartType.Family)); return result; }
internal void AddName(string value) { if (name == null) { name = new List<PN>(); } PN thisname = new PN(); thisname.Part.Add(new ENXP(value)); name.Add(thisname); }
public void SetPersonName(PN value) { RecipientRole.InitPerson(); RecipientRole.assignedPerson.SetName(value); }
/// <summary> /// Run the workload on the given Petri net /// </summary> /// <param name="net">The Petri net</param> public abstract void Perform(PN.PetriNet net);