GP Connect Problems and Medications

We already have an approved solution for GP Connect Medications, and are working on getting our system to consume GP Connect Problems. We’ve run into a situation where if we query for both GP Connect Medications and Problems at the same time, we receive a 422 Invalid param error.

We have narrowed down the problem to the fact that we’re specifying the medicationSearchFromDate for the Medications. If we remove the medicationSearchFromDate from the medication, we stop getting the 422 error.

My question is, is this intended? We would like to be able to query for Problems and Medications at the same time, but would also like to restrict how far into the past the medicaiton query goes. We could sort this out after retrieving both, but it would be more convenient to be able to just ask for what we want.

@awynn

Based on my understanding, it’s not possible to query both simultaneously.

Could you please explain your use case in more detail or clarify what you’re trying to achieve?

Thank you for your response.

We are a large hospital EHR system. Our use case is to bring in the information about a patient so that clinicians can review it and integrate it into the patient’s record. The way we currently have the system set up, they can either query individually for Allergies, Medications, and Problems, or pull in all 3 at once. In all cases, the information goes into a holding area to be reviewed by the clinician before final addition to the patient’s record.

What we’re struggling with at the moment is that we can pull in Allergies and Medications at the same time, and are trying to add Problems. When we add Problems to the large-scale query, if and only if we specify a medicationSearchFromDate, we receive a 422 error. We really only want to ask for medications back to a time horizon specified by the hospital, not for the life of the patient, so specifying the medicationSearchFromDate is quite convenient for our use.