Goal of the week
- Ensure that XML PATCHing works as it should on all the Fhir Resources that support patching in the OpenMRS Fhir2 Module. They should be able to take in an xml document like the one shown below:
<?xml version="1.0" encoding="UTF-8" ?> <!-- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under the terms of the Healthcare Disclaimer located at http://openmrs.org/license. Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS graphic logo is a trademark of OpenMRS Inc. --> <diff xmlns:fhir="http://hl7.org/fhir"> <replace sel="/fhir:MedicationDispense/fhir:status/@value"> completed </replace> </diff>
- The root element is named diff and it belongs to the XML namespace "http://hl7.org/fhir". Namespaces allow for the differentiation of elements with the same name but belonging to different contexts or specifications.
- Within the diff element, there is a child element named replace. It specifies the XPath expression sel attribute which selects a specific attribute value in the XML document. In this case, it selects the value attribute of the status element under the MedicationDispense element in the FHIR namespace. The text content within the replace element is completed, indicating the new value that will replace the selected attribute's current value.Therefore, the above XML patch document modifies an existing XML document in the OpenMRS Fhir2 Module.
Highlights / Pull Requests
- Clean up parameter passing in Practitioner Service class method: Service classes that support searching will often accept a long list of optional search parameters, where most of these parameters are not used (and thus passed in as null). This can lead to noisy and hard to maintain code. I pulled all search parameters for the Practitioner Service class into a separate searchParams class.
- Add Support for XML PATCHing operations - MedicationDispense
- Add Support for XML PATCHing operations - Task Resource.
- Add Support for XML PATCHing operations - Medication Resource.
- Add Support for XML PATCHing operations - DiagnosticReport
- Add Support for XML PATCHing operations - MedicationRequest
- Add Support for XML PATCHing operations - Condition
- Add Support for XML PATCHing operations - Person
- Add Support for XML PATCHing operations - AllergyIntolerance
- Add Support for XML PATCHing operations - Practitioner
- Add Support for XML PATCHing operations - Patient
- Clean up parameter passing in Medication Service class method