How to include a list of Diagnoses in the CDS response CARD

64 views
Skip to first unread message

Tien Thai

unread,
Feb 8, 2021, 3:34:51 PM2/8/21
to CDS Hooks
Hi all,

I have defined a subpopulation in my CDS service where it returns  a list of active diagnoses.   Can you please provide me any suggestion you might have on how to include this diagnoses list in the CDS response CARD?  Many thanks for your help.


Best,
Tien Thai

dennis.p...@cerner.com

unread,
Feb 8, 2021, 4:58:48 PM2/8/21
to CDS Hooks
Presumably the EHR already has knowledge of some set of diagnoses for the patient.  Are you trying to import new diagnoses from an external system, or can you elaborate on the reason for returning them in the card?

Tien Thai

unread,
Feb 8, 2021, 5:07:22 PM2/8/21
to CDS Hooks
Hi Dennis,
Basically, the CDS client will pass in my CDS service all patient's diagnoses data and the CDS Service will only look for certain codes.  Suppose it found a couple of of them, I would like to include those 2 found diagnosis codes in the returned CARD.   

Thank you.

Best,
Tien Thai

dennis.p...@cerner.com

unread,
Feb 8, 2021, 6:00:07 PM2/8/21
to CDS Hooks
What decision support guidance are you returning in your card?  Why does the user need to know that your service recognizes two of the patients' diagnoses?

darte...@gmail.com

unread,
Feb 8, 2021, 7:11:18 PM2/8/21
to CDS Hooks
The question being asked is quite general, and the Cerner CDS hooks tutorial should pretty much get you there, but if you want to view a snippet of my code where I also did this (in Python), please see below. However, not all the context to this code is included. Patient observations/conditions are fetched with GET HTTP methods, filtered based upon LOINC codes.

# create the patient view card
def getPatientViewCard(currentPatient, to_display):

    full_name = currentPatient.first_name + ' ' + currentPatient.last_name
    patient_view_card = {
        'cards' : [
            {
                'summary'   : f'{full_name} is displayed in the card below',
                'detail'    : f'{to_display}',
                'indicator' : 'info',
                'source'    : {
                                'label' : 'My App',
                                'url'   : 'https://www.urltomyapp.com/'
                              },
                'links' : [
                    {
                        'label' : 'Go to my App',
                        'url'   : f'{config_setup["general"]["smart_app_url"]}',
                        'type'  : 'smart'
                    }
                ]
            }
        ]
    }  
    return patient_view_card


# create the text to be displayed in the patient view card
def obtainCardText(currentPatient, patientObservations, patientChartData):

    to_display = 'The patient has the following diagnoses:' 
    if len(patientObservations.conditions) > 0:
        to_display += f'<br>&nbsp•&nbsp<b>Conditions:</b> {patientObservations.conditions}'
    if len(patientObservations.medications) > 0:
        to_display += f'<br>&nbsp•&nbsp<b>Medications:</b> {patientObservations.medications}'
    if len(patientObservations.allergies) > 0:
        to_display += f'<br>&nbsp•&nbsp<b>Allergies:</b> {patientObservations.allergies}'
    to_display += '\n\n&nbsp'  

    return to_display

Tien Thai

unread,
Feb 8, 2021, 7:38:31 PM2/8/21
to CDS Hooks
Hi Dennis,
Let me try to make it simpler by saying when the CDS client calls my CDS service, it is passing in all diagnoses for the patient and it expects to get back a list of active diagnoses out of those passed in diagnoses.  How do I make my CDS service to just return this list of active diagnoses?

Thanks for your help, Dennis.
TT.

Tien Thai

unread,
Feb 8, 2021, 7:48:25 PM2/8/21
to CDS Hooks
Darte,
Let me try out your suggestion.  Thank you very much for your suggestion.

Regards,
TT
Reply all
Reply to author
Forward
0 new messages