Patient Verification against external Patient Demographics Provider - dcm4che/dcm4chee-arc-light GitHub Wiki

Overview

This feature allows scheduler triggered or user triggered patient(s) verification against external Patient Demographics Provider(s). It also provides an option to verify the patient(s) once or to periodically verify it .

Patient Demographics Query REST services

Configuration

Alternatively, same steps indicated above can be directly imported into LDAP using following ldif

    version: 1 
    dn: dcmPDQServiceID=testHAPI,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    objectClass: dcmPDQService
    dcmPDQServiceID: testHAPI
    dcmURI: pdq-fhir:HAPI
    dicomDescription: Test PDQ with FHIR HL7 External Patient Demographics Supplier - HAPI Server
    dcmProperty: XSLStylesheetURI=${jboss.server.temp.url}/dcm4chee-arc/fhir-pat2dcm.xsl
    dcmProperty: search._format=xml
    dcmProperty: search.identifier.system=https://github.com/synthetichealth/synthea

    dn: dcmPDQServiceID=Test HL7 PDQ,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    objectClass: dcmPDQService
    dcmPDQServiceID: Test HL7 PDQ
    dcmURI: pdq-hl7:HL7SND/DCM4CHEE:HL7RCV/DCM4CHEE
    dicomDescription: Test PDQ with External HL7 Patient Demographics Supplier
    dcmProperty: XSLStylesheetURI=${jboss.server.temp.url}/dcm4chee-arc/hl7-adt2dcm.xsl

    dn: dcmPDQServiceID=Test PDQ,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    objectClass: dcmPDQService
    dcmPDQServiceID: Test PDQ
    dcmURI: pdq-dicom:EXTERNAL_ARCHIVE_AET
    dicomDescription: Test PDQ with External Archive
    dcmTag: 00100010
    dcmTag: 00100021
    dcmTag: 00100040
    dcmTag: 00100040
    dcmProperty: LocalAET=DCM4CHEE 

    dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    objectClass: dicomDevice
    objectClass: dcmDevice
    objectClass: dcmArchiveDevice
    dcmPDQServiceID: Test PDQ
    dcmPatientVerificationPollingInterval: PT1M
    dcmPatientVerificationFetchSize: 150
    dcmPatientVerificationAdjustIssuerOfPatientID: TRUE
    dcmPatientVerificationPeriod: P1D
    dcmPatientVerificationPeriodOnNotFound: P1W
    dcmPatientVerificationRetryInterval: PT1H
    dcmPatientVerificationMaxRetries: 10
    dcmPatientVerificationMaxStaleness: PT2H

with help of Apache Directory Studio or LDAP Command Line Tools

For the configuration to be effective - if configured using ldif snippet - use archive UI to reload the configuration.

  • Accessible from Configuration page - Control tab

References

DICOM Conformance Statement

HL7 based PDQ

IHE (Integrating the Health Enterprise) - ITI (IT Infrastructure) framework

HL7

FHIR based PDQ

IHE (Integrating the Health Enterprise) - ITI (IT Infrastructure) framework

HL7 FHIR

Open Source FHIR Patient Demographics Supplier

Testing

DICOM PDQ Service - Scheduler triggered patient verification

Verify patient verification in Wildfly logs, after the configured Patient Verification Polling Interval is lapsed

2018-10-31 14:18:22,090 INFO  [org.dcm4chee.arc.pdq.scheduler.PatientVerificationScheduler] (EE-ManagedScheduledExecutorService-default-Thread-10) start PatientVerificationScheduler.execute()
2018-10-31 14:18:22,095 INFO  [org.dcm4chee.arc.pdq.scheduler.PatientVerificationScheduler] 
(EE-ManagedScheduledExecutorService-default-Thread-2) Verified Patient[pk=1910, id=P-00000002] against 
PDQService{id=Test PDQ, uri=pdq-dicom:TEST}
2018-10-31 14:18:22,295 INFO  [org.dcm4chee.arc.pdq.scheduler.PatientVerificationScheduler] (EE-ManagedScheduledExecutorService-default-Thread-10) finished PatientVerificationScheduler.execute()

Patient verification is not done if the patient in local archive is not present at the external archive

2018-10-31 13:58:56,125 INFO  [org.dcm4chee.arc.pdq.scheduler.PatientVerificationScheduler] 
(EE-ManagedScheduledExecutorService-default-Thread-13) Patient[pk=1902, id=MEE4-54798^^^MEE4&1.3.6.1.4.1.12559.11.1.4.1.2&ISO] 
not found at PDQService{id=testPDQ, uri=pdq-dicom:TEST} - no verification

HL7 PDQ Service - Scheduler triggered patient verification

Start hl7rcv tool with -x option (specifying stylesheet) to generate response by applying specified stylesheet.

hl7rcv -x ~/dcm4che/etc/hl7rcv/rsp_k22.xsl -b 2576 --ignore

Verify patient verification in Wildfly logs, after the configured Patient Verification Polling Interval is lapsed

2021-07-05 10:43:47,804 INFO  [org.dcm4chee.arc.pdq.scheduler.PatientVerificationScheduler] (EE-ManagedScheduledExecutorService-default-Thread-10) start PatientVerificationScheduler.execute()
2021-07-05 10:43:47,870 INFO  [org.dcm4che3.hl7.MLLPConnection] (EE-ManagedScheduledExecutorService-default-Thread-10) Socket[addr=localhost/127.0.0.1,port=2576,localport=38415] << MSH|^~\&|HL7SND|DCM4CHEE|HL7RCV|DCM4CHEE|20210705104347.865||QBP^Q22^QBP_Q21|2126109594|P|2.5||||||8859/1|||
2021-07-05 10:43:48,003 INFO  [org.dcm4che3.hl7.MLLPConnection] (EE-ManagedScheduledExecutorService-default-Thread-10) Socket[addr=localhost/127.0.0.1,port=2576,localport=38415] >> MSH|^~\&|HL7RCV|DCM4CHEE|HL7SND|DCM4CHEE|20210705104347.952||RSP^K22^RSP_K21|222004739|P|2.5||||||8859/1
2021-07-05 10:43:48,166 INFO  [org.dcm4chee.arc.pdq.scheduler.PatientVerificationScheduler] (EE-ManagedScheduledExecutorService-default-Thread-10) Verified Patient[pk=182903, id=PDQ-4711e^^^DCM4CHE-TEST&1.2.40.0.13.1.1.999&ISO] against PDQService{id=testhl7pdq, uri=pdq-hl7:HL7SND/DCM4CHEE:HL7RCV/DCM4CHEE}
2021-07-05 10:43:48,166 INFO  [org.dcm4chee.arc.pdq.scheduler.PatientVerificationScheduler] (EE-ManagedScheduledExecutorService-default-Thread-10) finished PatientVerificationScheduler.execute()

Verify receive of QBP^Q22 query message in hl7rcv tool window and the corresponding response sent back to the archive

10:36:51,035 INFO  - Start TCP Listener on 0.0.0.0/0.0.0.0:2576
10:43:47,867 INFO  - Accept connection Socket[addr=/127.0.0.1,port=38415,localport=2576]
10:43:47,881 INFO  - Socket[addr=/127.0.0.1,port=38415,localport=2576] >> MSH|^~\&|HL7SND|DCM4CHEE|HL7RCV|DCM4CHEE|20210705104347.865||QBP^Q22^QBP_Q21|2126109594|P|2.5||||||8859/1|||
10:43:47,884 DEBUG - Socket[addr=/127.0.0.1,port=38415,localport=2576] >> MSH|^~\&|HL7SND|DCM4CHEE|HL7RCV|DCM4CHEE|20210705104347.865||QBP^Q22^QBP_Q21|2126109594|P|2.5||||||8859/1|||
QPD|IHE PDQ Query|QRY2126109594|@PID.3.1^[email protected]^[email protected]^[email protected]^ISO|
RCP|I||||||

10:43:48,001 INFO  - Socket[addr=/127.0.0.1,port=38415,localport=2576] << MSH|^~\&|HL7RCV|DCM4CHEE|HL7SND|DCM4CHEE|20210705104347.952||RSP^K22^RSP_K21|222004739|P|2.5||||||8859/1
10:43:48,001 DEBUG - Socket[addr=/127.0.0.1,port=38415,localport=2576] << MSH|^~\&|HL7RCV|DCM4CHEE|HL7SND|DCM4CHEE|20210705104347.952||RSP^K22^RSP_K21|222004739|P|2.5||||||8859/1
MSA|AA|2126109594|
QAK|QRY2126109594|OK
QPD|IHE PDQ Query|QRY2126109594|@PID.3.1^[email protected]^[email protected]^[email protected]^ISO|
PID|||PDQ-4711^^^DCM4CHE-TEST&1.2.40.0.13.1.1.999&ISO||DOE^JOHN||19471111|M|||STREET^^CITY^^4711|||||||ACC-4711^^^DCM4CHE-TEST&1.2.40.0.13.1.1.999&ISO

10:43:48,006 INFO  - Close connection Socket[addr=/127.0.0.1,port=38415,localport=2576]

FHIR HL7 PDQ Service - User triggered patient verification

  • Start HAPI server using Docker
    $ docker run -it -p 8780:8080 -d smartonfhir/hapi-5:r4-synthea
    
  • HAPI server UI can be accessed at
    http://localhost:8780/hapi-fhir-jpaserver
    
  • For querying demographics of a patient, user should know the patient identifier and issuer of patient present in external patient demographics supplier. In order get above information, query HAPI server directly using curl
    $ curl http://localhost:8780/hapi-fhir-jpaserver/fhir/Patient?_format=xml | grep -B2 '</identifier>' | head
    
    resulting in response as
                   <system value="https://github.com/synthetichealth/synthea"/>
                 <value value="e925b0f3-8006-43f6-aa31-94bd215e55e7"/>
              </identifier>
    --
    <system value="http://hospital.smarthealthit.org"/>
    <value value="e925b0f3-8006-43f6-aa31-94bd215e55e7"/>
    </identifier>
    --
    <system value="http://hl7.org/fhir/sid/us-ssn"/>
    <value value="999-22-1962"/>
    
  • Use the returned patient identifier and system value as issuer of patient identifier in archive's Query Patient Demographics service using curl.
    curl -v -X GET 'http://localhost:8880/dcm4chee-arc/pdq/testHAPI/patients/e925b0f3%2D8006%2D43f6%2Daa31%2D94bd215e55e7%5E%5E%5Ehttps%3A%2F%2Fgithub%2Ecom%2Fsynthetichealth%2Fsynthea'
    Note: Unnecessary use of -X or --request, GET is already inferred.
    *   Trying 127.0.0.1:8880...
    * Connected to localhost (127.0.0.1) port 8880 (#0)
    > GET /dcm4chee-arc/pdq/testHAPI/patients/e925b0f3%2D8006%2D43f6%2Daa31%2D94bd215e55e7%5E%5E%5Ehttps%3A%2F%2Fgithub%2Ecom%2Fsynthetichealth%2Fsynthea HTTP/1.1
    > Host: localhost:8880
    > User-Agent: curl/7.81.0
    > Accept: */*
    >
    * Mark bundle as not supporting multiuse
    < HTTP/1.1 200 OK
    < Cache-Control: no-cache
    < Access-Control-Allow-Headers: origin, content-type, accept, authorization
    < Access-Control-Expose-Headers: content-type, warning
    < Date: Fri, 10 Jun 2022 20:37:50 GMT
    < Connection: keep-alive
    < Access-Control-Allow-Origin: *
    < Access-Control-Allow-Credentials: true
    < Transfer-Encoding: chunked
    < Content-Type: application/dicom+json
    < Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, HEAD
    <
    {"00100010":{"vr":"PN","Value":[{"Alphabetic":"Koepp^Abdul^^Mr."}]},"00100020":{"vr":"LO","Value":["e925b0f3-8006-43f6-aa31-94bd215e55e7"]},
    "00100021":{"vr":"LO","Value":["https://github.com/synthetichealth/synthea"]},"00100030":{"vr":"DA","Value":["19541002"]},
    "00100040":{"vr":"CS","Value":["M"]},"00101002":{"vr":"SQ","Value":[{"00100020":{"vr":"LO","Value":["e925b0f3-8006-43f6-aa31-94bd215e55e7"]},
    "00100021":{"vr":"LO","Value":["http://hospital.smarthealthit.org"]},"00100024":{"vr":"SQ","Value":[{"00400035":{"vr":"CS","Value":["MR"]}}]}},
    {"00100020":{"vr":"LO","Value":["999-22-1962"]},"00100021":{"vr":"LO","Value":["http://hl7.org/fhir/sid/us-ssn"]},
    "00100024":{"vr":"SQ","Value":[{"00400035":{"vr":"CS","Value":["SS"]}}]}},{"00100020":{"vr":"LO","Value":["S99942380"]},
    "00100021":{"vr":"LO","Value":["urn:oid:2.16.840.1.113883.4.3.25"]},"00100024":{"vr":"SQ","Value":[{"00400035":{"vr":"CS","Value":["DL"]}}]}},
    {"00100020":{"vr":"LO","Value":["X45815551X"]},"00100021":{"vr":"LO","Value":["http://standardhealthrecord.org/fhir/StructureDefinition/passportNumber"]},
    "00100024":{"vr":"SQ","Value":[{"00400035":{"vr":"CS","Value":["PPN"]}}]}}]},"00101040":{"vr":"LO","Value":["313 Lockman Row Suite 4^^Peabody^Massachusetts^01940^US^"]},
    "00101060":{"vr":"PN","Value":[{"Alphabetic":"Aiko Jacobs"}]}}
    
⚠️ **GitHub.com Fallback** ⚠️