-
Notifications
You must be signed in to change notification settings - Fork 9
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
HSC-379: Add support for imaging, procedure and medical supply orders #68
Conversation
@corneliouzbett @rbuisson Please review the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This repository doesn't automatically add license headers; please add them to new Java classes. Regarding "models," a more appropriate name would be "DTOs" (data transfer objects), as that is what they are used for(If you can find a way to depend on OpenMRS API, that would a cleaner approach). Additionally, let's extract these DTOs into a dedicated sub-module within this project, along with mappers to transform them into FHIR resources. WDYT?
camel-openmrs-fhir/src/main/java/org/openmrs/eip/fhir/routes/resources/ProcedureRouter.java
Show resolved
Hide resolved
camel-openmrs-fhir/src/main/java/org/openmrs/eip/fhir/routes/resources/ProcedureRouter.java
Outdated
Show resolved
Hide resolved
camel-openmrs-fhir/src/main/java/org/openmrs/eip/fhir/routes/resources/ProcedureRouter.java
Outdated
Show resolved
Hide resolved
camel-openmrs-fhir/src/main/java/org/openmrs/eip/fhir/routes/resources/SupplyRequestRouter.java
Show resolved
Hide resolved
camel-openmrs-fhir/src/main/java/org/openmrs/eip/fhir/routes/resources/SupplyRequestRouter.java
Outdated
Show resolved
Hide resolved
camel-openmrs-fhir/src/main/java/org/openmrs/eip/fhir/routes/resources/SupplyRequestRouter.java
Outdated
Show resolved
Hide resolved
...penmrs-fhir/src/test/java/org/openmrs/eip/fhir/routes/resources/SupplyRequestRouterTest.java
Outdated
Show resolved
Hide resolved
@corneliouzbett regarding
This is an intermediate solution where we don't actually depend on FHIR resources (as they are not implemented) because of which we have to depend on OpenMRS rest APIs hence need of DTOs and mappers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good. Some nit-picking comments. However, the disabled tests should be fixed before merging.
camel-openmrs-fhir/src/main/java/org/openmrs/eip/fhir/routes/resources/ProcedureRouter.java
Outdated
Show resolved
Hide resolved
camel-openmrs-fhir/src/main/java/org/openmrs/eip/fhir/routes/resources/SupplyRequestRouter.java
Outdated
Show resolved
Hide resolved
camel-openmrs-fhir/src/test/java/org/openmrs/eip/fhir/spring/OpenmrsFhirConfigurationTest.java
Show resolved
Hide resolved
camel-openmrs-fhir/src/test/java/org/openmrs/eip/fhir/routes/resources/ProcedureRouterTest.java
Outdated
Show resolved
Hide resolved
camel-openmrs-fhir/src/main/java/org/openmrs/eip/fhir/spring/OpenmrsRestConfiguration.java
Show resolved
Hide resolved
@rbuisson can you merge this PR I don't have write access to this repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @VaishSiddharth I missed out statuses and handling of OpenMRS order actions. Can you look into it.
camel-openmrs-fhir/src/main/java/org/openmrs/eip/fhir/routes/resources/ProcedureRouter.java
Outdated
Show resolved
Hide resolved
camel-openmrs-fhir/src/main/java/org/openmrs/eip/fhir/routes/resources/SupplyRequestRouter.java
Outdated
Show resolved
Hide resolved
public static final String TEST_ORDER_TYPE_UUID = "52a447d3-a64a-11e3-9aeb-50e549534c5e"; | ||
|
||
public static final String IMAGING_ORDER_TYPE_UUID = "8d2aff07-55e6-4a4a-8878-72b9eb36a3b8"; | ||
|
||
public static final String PROCEDURE_ORDER_TYPE_UUID = "67a92e56-0f88-11ea-8d71-362b9e155667"; | ||
|
||
public static final String SUPPLY_REQUEST_ORDER_TYPE_UUID = "67a92bd6-0f88-11ea-8d71-362b9e155667"; | ||
|
||
public static final String DRUG_ORDER_TYPE_UUID = "131168f4-15f5-102d-96e4-000c29c2a5d7"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, hardcoding UUIDs is not ideal, as different implementations may require different sets of UUIDs. I would prefer making these configurable with default values, rather than embedding them directly into the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah you are right. But let's take this up separately as this is an existing practice for this repo.
Have created a ticket here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this issue is becoming more prominent as it is going to be consumed by existing distributions with pre-existing data. The sooner this is addressed, the better. I believe this can be resolved in the current PR, as it already includes the majority of the referenced UUIDs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment, small issue
This can be merge in!
JIRA: https://mekomsolutions.atlassian.net/browse/HSC-379
Add support for Imaging, Procedure and Medical supply orders