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

Add new FhirContactPoints domain #253

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

mherman22
Copy link

No description provided.

@mherman22 mherman22 changed the title Add Domain for FhirContactPoints Add new FhirContactPoints domain. Oct 20, 2023
@ibacher
Copy link
Member

ibacher commented Oct 30, 2023

@mherman22 Is there no way to get this to work without shifting to 2.0.0 of the FHIR2 module? I would prefer to support older versions.

@mherman22
Copy link
Author

@mherman22 Is there no way to get this to work without shifting to 2.0.0 of the FHIR2 module? I would prefer to support older versions.

I was trying this out. I'm pushing it back to 1.11.0 however the challenge there has to do with the location type translator not being got as a bean i.e NoSuchBeanException

@mherman22 mherman22 force-pushed the ContactPointMap-impl branch 2 times, most recently from 825acb5 to 8bc7331 Compare November 14, 2023 15:15
@ibacher
Copy link
Member

ibacher commented Nov 15, 2023

It looks like we're going to need to make 2.6 the minimum version for the LoaderTest and probably the validator too for this to work. @Ruhanga Do you have an opinion on that? Otherwise, we maybe add something to the Loader to not try to run a domain if a valid version of a loader isn't available.

@mherman22
Copy link
Author

It looks like we're going to need to make 2.6 the minimum version for the LoaderTest and probably the validator too for this to work. @Ruhanga Do you have an opinion on that? Otherwise, we maybe add something to the Loader to not try to run a domain if a valid version of a loader isn't available.

Fyi, I have done this locally though it is now not loading the loader for QUEUE so I am still looking for a workaround around that.

@Ruhanga
Copy link
Member

Ruhanga commented Nov 16, 2023

It looks like we're going to need to make 2.6 the minimum version for the LoaderTest and probably the validator too for this to work.

@ibacher, @mherman22 concerning the above, upgrading to OpenMRS Core greater than 2.4.0 might require refactoring on the part of the Validator to accommodate new changes + upgraded libraries on Core. This will consequently need some extensive testing of the Validator itself.

@ibacher
Copy link
Member

ibacher commented Nov 27, 2023

First bit looks like we need to change the calls like:

executeChangelog("changelog", null);

To:

executeChangelog("changelog", (ChangeSetExecutorCallback) null);

In ConfigTester...

Copy link
Member

@mks-d mks-d left a comment

Choose a reason for hiding this comment

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

@mherman22 could you provide a detailed description to this PR so as to provide more context? Or @ibacher could you speak to it?

import org.springframework.stereotype.Component;

@Component
@OpenmrsProfile(modules = { "fhir2:1.11.* - 9.*" }, openmrsPlatformVersion = "2.6.3 - 2.6.*, 2.7.* - 9.*")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@OpenmrsProfile(modules = { "fhir2:1.11.* - 9.*" }, openmrsPlatformVersion = "2.6.3 - 2.6.*, 2.7.* - 9.*")
@OpenmrsProfile(modules = { "fhir2:1.11.* - 9.*" }, openmrsPlatformVersion = "2.6.3 - 9.*")

Copy link
Member

Choose a reason for hiding this comment

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

@ibacher is this (namely → modules = { "fhir2:1.11.* - 9.*" }) used because there is no way to say "1.11.* and above"?

Copy link
Member

Choose a reason for hiding this comment

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

Actually, I think we could just use fhir2:1.11.0 and possibly the same for openmrsPlatformVersion. I always forget how these get parsed.

Copy link
Member

Choose a reason for hiding this comment

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

Let's try these, here and elsewhere:

Suggested change
@OpenmrsProfile(modules = { "fhir2:1.11.* - 9.*" }, openmrsPlatformVersion = "2.6.3 - 2.6.*, 2.7.* - 9.*")
@OpenmrsProfile(modules = { "fhir2:1.11.0" }, openmrsPlatformVersion = "2.6.3")

@ibacher
Copy link
Member

ibacher commented Jun 28, 2024

@mks-d This PR adds support for a feature that allows mapping between OMRS Attributes and FHIR ContactPoints. It populates a table that we use in the FHIR2 module to map between them. So, if you have an attribute that represents something covered by FHIR's ContactPoints type (phone number, email, website, etc.) as either a PersonAttribute or standard OMRS attribute, it will show up in the FHIR2 output for Patient, Provider, Location, etc. in the appropriate semantic field rather than as an OMRS-specific extension.

@mks-d mks-d requested a review from ibacher June 28, 2024 15:07
Copy link
Member

@mks-d mks-d left a comment

Choose a reason for hiding this comment

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

@ibacher will you re-review this then?

README.md Outdated
@@ -149,6 +150,7 @@ This is the list of currently supported domains in their loading order:
1. [Cohort Attribute Types (CSV files)](readme/cohort.md#domain-cohortattributetypes)
1. [FHIR Concept Sources (CSV files)](readme/fhir.md#domain-fhirconceptsources)
1. [FHIR Patient Identifier Systems (CSV Files)](readme/fhir.md#domain-fhirpatientidentifiersystems)
2. [FHIR ContactPointMap (CSV Files)](https://github.com/mherman22/openmrs-module-initializer/blob/ContactPointMap-impl/readme/fhir.md#domain-fhircontactpointmap)
Copy link
Member

Choose a reason for hiding this comment

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

The path is wrong here.

Also let's use normal Title Case: "Contact Point Map".

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
2. [FHIR ContactPointMap (CSV Files)](https://github.com/mherman22/openmrs-module-initializer/blob/ContactPointMap-impl/readme/fhir.md#domain-fhircontactpointmap)
2. [FHIR Contact Point Map (CSV Files)](readme/fhir.md#domain-fhircontactpointmap)

Copy link
Member

@ibacher ibacher left a comment

Choose a reason for hiding this comment

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

@mherman22 Are you able to wrap up the necessary changes here?

README.md Outdated
@@ -60,6 +60,7 @@ configuration/
├── encounterroles/
├── fhirconceptsources/
├── fhirpatientidentifiersystems/
├── fhirContactPointMap/
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
├── fhirContactPointMap/
├── fhircontactpointmaps/

README.md Outdated
@@ -149,6 +150,7 @@ This is the list of currently supported domains in their loading order:
1. [Cohort Attribute Types (CSV files)](readme/cohort.md#domain-cohortattributetypes)
1. [FHIR Concept Sources (CSV files)](readme/fhir.md#domain-fhirconceptsources)
1. [FHIR Patient Identifier Systems (CSV Files)](readme/fhir.md#domain-fhirpatientidentifiersystems)
2. [FHIR ContactPointMap (CSV Files)](https://github.com/mherman22/openmrs-module-initializer/blob/ContactPointMap-impl/readme/fhir.md#domain-fhircontactpointmap)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
2. [FHIR ContactPointMap (CSV Files)](https://github.com/mherman22/openmrs-module-initializer/blob/ContactPointMap-impl/readme/fhir.md#domain-fhircontactpointmap)
2. [FHIR Contact Point Map (CSV Files)](readme/fhir.md#domain-fhircontactpointmap)

import org.springframework.stereotype.Component;

@Component
@OpenmrsProfile(modules = { "fhir2:1.11.* - 9.*" }, openmrsPlatformVersion = "2.6.3 - 2.6.*, 2.7.* - 9.*")
Copy link
Member

Choose a reason for hiding this comment

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

Let's try these, here and elsewhere:

Suggested change
@OpenmrsProfile(modules = { "fhir2:1.11.* - 9.*" }, openmrsPlatformVersion = "2.6.3 - 2.6.*, 2.7.* - 9.*")
@OpenmrsProfile(modules = { "fhir2:1.11.0" }, openmrsPlatformVersion = "2.6.3")

import static org.openmrs.module.initializer.api.fhir.cpm.FhirContactPointMapCsvParser.ATTRIBUTE_TYPE_DOMAIN_HEADER;

@Component
@OpenmrsProfile(modules = { "fhir2:1.11.* - 9.*" }, openmrsPlatformVersion = "2.6.3 - 2.6.*, 2.7.* - 9.*")
Copy link
Member

Choose a reason for hiding this comment

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

See previous

Comment on lines 26 to 30
private static final String SYSTEM_HEADER = "system";

private static final String USE_HEADER = "use";

private static final String RANK_HEADER = "rank";
Copy link
Member

Choose a reason for hiding this comment

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

I think headers are normally capitalized, e.g. "System", etc.

Comment on lines 31 to 33
public static final String ATTRIBUTE_TYPE_DOMAIN_HEADER = "Entity name";

public static final String ATTRIBUTE_TYPE = "Attribute Type";
Copy link
Member

Choose a reason for hiding this comment

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

Headers at least should be like "Entity name", so, e.g., "Attribute type", etc.

|--------------------------------------|-------------|-------------|--------------------------------------|--------|------|------|-------------|
| fa48acc4-ef1f-46d6-b0af-150b00ddee9d | | person | 717ec942-3c4a-11ea-b024-ffc81a23382e | PHONE | WORK | 1 | |
| | | person | PAT_RENAME_NEW_NAME | PHONE | HOME | | |
Copy link
Member

Choose a reason for hiding this comment

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

Is the Attribute Type field here correct?

@mherman22
Copy link
Author

@mherman22 Are you able to wrap up the necessary changes here?

On it

@ibacher ibacher changed the title Add new FhirContactPoints domain. Add new FhirContactPoints domain Jul 1, 2024
api-2.6/pom.xml Outdated
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>initializer</artifactId>
<version>2.7.0-SNAPSHOT</version>
Copy link
Member

Choose a reason for hiding this comment

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

We should update this now that 2.7.0 is released. I guess this should be 2.8.0-SNAPSHOT.

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