Skip to content
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

Merged
merged 23 commits into from
Jan 29, 2025

Conversation

VaishSiddharth
Copy link
Contributor

@VaishSiddharth VaishSiddharth commented Jan 9, 2025

JIRA: https://mekomsolutions.atlassian.net/browse/HSC-379

Add support for Imaging, Procedure and Medical supply orders

@VaishSiddharth
Copy link
Contributor Author

@corneliouzbett @rbuisson Please review the PR.

Copy link
Member

@corneliouzbett corneliouzbett left a 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?

@VaishSiddharth
Copy link
Contributor Author

@corneliouzbett regarding

Additionally, let's extract these DTOs into a dedicated sub-module within this project, along with mappers to transform them into FHIR resources. WDYT?

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.
I would not like to make this a structured way of doing things by splitting up the DTOs and mappers to a sub module rather we should keep it intact inside the route so that when we are ready with the FHIR resources we can delete all this code.

Copy link
Member

@corneliouzbett corneliouzbett left a 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.

@corneliouzbett corneliouzbett changed the title HSC-379: Add support for Imaging, Procedure and Medical supply orders HSC-379: Add support for imaging, procedure and medical supply orders Jan 24, 2025
@VaishSiddharth
Copy link
Contributor Author

@rbuisson can you merge this PR I don't have write access to this repository.

Copy link
Member

@corneliouzbett corneliouzbett left a 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.

Comment on lines 23 to 32
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";

Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ruhanga I would not want to include the changes you suggested in this PR. I have created a new PR for the above ticket. Will need to fix test cases to make it work.

I would request @rbuisson to please merge this PR as this is blocking HSC deployment.

Copy link
Member

@corneliouzbett corneliouzbett left a 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!

@rbuisson rbuisson merged commit 2ca128b into openmrs:master Jan 29, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants