Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Familyname after marriage (PDQQuery) #178

Open
ch-fuchs opened this issue Sep 18, 2024 · 2 comments
Open

Get Familyname after marriage (PDQQuery) #178

ch-fuchs opened this issue Sep 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ch-fuchs
Copy link
Collaborator

ch-fuchs commented Sep 18, 2024

have got an issue from the customer that the vaccination module (using Husky) does not display the correct family name.

We could see that Husky uses the first name given in the list of names, see FhirPatient#getConvenienceName()
HumanName humanName = this.getNameFirstRep();
Our customer has a case where the first name is the maiden name and not the actual family name (after marriage).

I have attached an example where you can see on line 47ff that there are two names. For the family name in line 52, there is the qualifier "BR" indicating that it is the maiden name. Husky should look through all names to take the one which does not contain the BR qualier.

After first analysis, I am however not sure that if we can solve this issue on Husky itself or if we need to handover to IPF because the BR qualifier is not given into the PRPAIN201306UV02Type (or rather the PRPAMT201310UV02Person with the PN class). It would be nice to get a 2nd opinion on it.

Example PDQ response

<ns1:PRPA_IN201306UV02 xmlns:ns1="(" ITSVersion="XML_1.0" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
	<ns1:id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="1.2.3.4.5" extension="30"/>
	<ns1:creationTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:TS" value="20240918162346"/>
	<ns1:versionCode code="V3PR1"/>
	<ns1:interactionId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="2.16.840.1.113883" extension="PRPA_IN201306UV02"/>
	<ns1:processingCode code="P"/>
	<ns1:processingModeCode code="T"/>
	<ns1:acceptAckCode code="NE"/>
	<ns1:receiver typeCode="RCV">
		<ns1:device classCode="DEV" determinerCode="INSTANCE">
			<ns1:id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="1.2.3.4"/>
			<ns1:asAgent classCode="AGNT">
				<ns1:representedOrganization classCode="ORG" determinerCode="INSTANCE">
					<ns1:id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="1.2.3.4"/>
				</ns1:representedOrganization>
			</ns1:asAgent>
		</ns1:device>
	</ns1:receiver>
	<ns1:sender typeCode="SND">
		<ns1:device classCode="DEV" determinerCode="INSTANCE">
			<ns1:id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="1.3.6.1.4.1.21367.2017.2.5.97"/>
			<ns1:asAgent classCode="AGNT">
				<ns1:representedOrganization classCode="ORG" determinerCode="INSTANCE">
					<ns1:id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="1.3.6.1.4.1.21367.2017.2.5.97"/>
				</ns1:representedOrganization>
			</ns1:asAgent>
		</ns1:device>
	</ns1:sender>
	<ns1:acknowledgement>
		<ns1:typeCode code="AA"/>
		<ns1:targetMessage>
			<ns1:id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="2.16.840.1.113883.1.6.1" extension="1.21726669426641"/>
		</ns1:targetMessage>
	</ns1:acknowledgement>
	<ns1:controlActProcess classCode="CACT" moodCode="EVN">
		<ns1:code xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:CD" code="PRPA_TE201306UV02"/>
		<ns1:subject typeCode="SUBJ" contextConductionInd="false">
			<ns1:registrationEvent classCode="REG" moodCode="EVN">
				<ns1:id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" nullFlavor="NA"/>
				<ns1:statusCode code="active"/>
				<ns1:subject1 typeCode="SBJ">
					<ns1:patient classCode="PAT">
						<ns1:id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="1.3.6.1.4.1.21367.2017.2.5.93" extension="c8c41e67-9fab-4eb4-ace3-7d6528b4d501" assigningAuthorityName="XDS Affinity Domain"/>
						<ns1:id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="2.16.756.5.30.1.127.3.10.3" extension="7560540735006" assigningAuthorityName="SPID"/>
						<ns1:statusCode code="active"/>
						<ns1:patientPerson classCode="PSN" determinerCode="INSTANCE">
							<ns1:name xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:PN">
								<ns1:given>REMO SANDRO</ns1:given>
								<ns1:family>DAHLER-CASALI</ns1:family>
							</ns1:name>
							<ns1:name xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:PN">
								<ns1:family ns1:qualifier="BR">Schuhmacher</ns1:family>
							</ns1:name>
							<ns1:administrativeGenderCode code="M"/>
							<ns1:birthTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:TS" value="19740422"/>
						</ns1:patientPerson>
						<ns1:providerOrganization classCode="ORG" determinerCode="INSTANCE">
							<ns1:id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="1.3.6.1.4.1.21367.13.20.2000"/>
							<ns1:contactParty classCode="CON"/>
						</ns1:providerOrganization>
						<ns1:subjectOf1>
							<ns1:queryMatchObservation classCode="COND" moodCode="EVN">
								<ns1:code xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:CD" code="IHE_PDQ"/>
								<ns1:value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:INT" value="100"/>
							</ns1:queryMatchObservation>
						</ns1:subjectOf1>
					</ns1:patient>
				</ns1:subject1>
				<ns1:custodian typeCode="CST">
					<ns1:assignedEntity classCode="ASSIGNED">
						<ns1:id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="1.3.6.1.4.1.12559.11.20.1"/>
						<ns1:assignedOrganization classCode="ORG" determinerCode="INSTANCE">
							<ns1:name xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:EN">
								<ns1:given>org</ns1:given>
							</ns1:name>
						</ns1:assignedOrganization>
					</ns1:assignedEntity>
				</ns1:custodian>
			</ns1:registrationEvent>
		</ns1:subject>
		<ns1:queryAck>
			<ns1:queryId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="1.2.840.114350.1.13.28.1.18.5.999" extension="17266694239132"/>
			<ns1:statusCode code="deliveredResponse"/>
			<ns1:queryResponseCode code="OK"/>
			<ns1:resultTotalQuantity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:INT" value="1"/>
			<ns1:resultCurrentQuantity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:INT" value="1"/>
			<ns1:resultRemainingQuantity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:INT" value="0"/>
		</ns1:queryAck>
		<ns1:queryByParameter>
			<ns1:queryId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="1.2.840.114350.1.13.28.1.18.5.999" extension="17266694239132"/>
			<ns1:statusCode code="new"/>
			<ns1:responseModalityCode code="R"/>
			<ns1:responsePriorityCode code="I"/>
			<ns1:parameterList>
				<ns1:livingSubjectId>
					<ns1:value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="1.3.6.1.4.1.12559.11.20.1" extension="420855a8-3306-4aa6-b6b3-6818ae850359"/>
					<ns1:semanticsText>LivingSubject.id</ns1:semanticsText>
				</ns1:livingSubjectId>
				<ns1:otherIDsScopingOrganization>
					<ns1:value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="1.3.6.1.4.1.21367.2017.2.5.93"/>
					<ns1:semanticsText>OtherIDs.scopingOrganization.id</ns1:semanticsText>
				</ns1:otherIDsScopingOrganization>
				<ns1:otherIDsScopingOrganization>
					<ns1:value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="2.16.756.5.30.1.127.3.10.3"/>
					<ns1:semanticsText>OtherIDs.scopingOrganization.id</ns1:semanticsText>
				</ns1:otherIDsScopingOrganization>
			</ns1:parameterList>
		</ns1:queryByParameter>
	</ns1:controlActProcess>
</ns1:PRPA_IN201306UV02>

nodeRepresentationFamilyNode

@ralych
Copy link
Collaborator

ralych commented Oct 3, 2024

@qligier Does this happen by transforming to the FHIR resource or is it not accessible by the classes of IPF?

@ralych ralych added the question Further information is requested label Oct 3, 2024
@project-husky-owner project-husky-owner added bug Something isn't working and removed question Further information is requested labels Oct 3, 2024
@unixoid
Copy link

unixoid commented Nov 5, 2024

The problem is the namespace prefix "ns1" of the attribute "qualifier":

<ns1:name xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:PN">
    <ns1:family ns1:qualifier="BR">Schuhmacher</ns1:family>
</ns1:name>

This prefix shall be not used here. After I removed it (and fixed the namespace declaration of ns1 in the first line, where you have
( instead of urn:hl7-org:v3), the following code:

public void testHusky() throws Exception {
    InputStream inputStream = PixV3QueryResponseTransformerTest.class.getClassLoader().getResourceAsStream("iti47-response-1.xml");
    PRPAIN201306UV02Type msg = HL7V3Transformer.unmarshallMessage(PRPAIN201306UV02Type.class, inputStream);
    List<PN> names = msg.controlActProcess.subject.get(0).registrationEvent.subject1.patient.patientPerson.name;
    for (PN name : names) {
        for (EnFamily family : name.getFamily()) {
            String value = String.join(" ", family.getListStringValues());
            if ("BR".equals(family.qualifier)) {
                System.out.println(value + " is a birth name");
            } else {
                System.out.println(value + " is not a birth name");
            }
        }
    }
}

delivers as expected:

DAHLER-CASALI is not a birth name
Schuhmacher is a birth name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants