openmrs-module-fhir2 icon indicating copy to clipboard operation
openmrs-module-fhir2 copied to clipboard

FM2-130:Adding support for the FHIR Media resource

Open tendomart opened this issue 4 years ago • 9 comments

Description of what I changed

Adding support for the FHIR Media resource

Issue I worked on

see https://issues.openmrs.org/browse/FM2-

Checklist: I completed these to help reviewers :)

  • [ ] My IDE is configured to follow the code style of this project.

    No? Unsure? -> configure your IDE, format the code and add the changes with git add . && git commit --amend

  • [ ] I have added tests to cover my changes. (If you refactored existing code that was well tested you do not have to add tests)

    No? -> write tests and add them to this commit git add . && git commit --amend

  • [ ] I ran mvn clean package right before creating this pull request and added all formatting changes to my commit.

    No? -> execute above command

  • [ ] All new and existing tests passed.

    No? -> figure out why and add the fix to your commit. It is your responsibility to make sure your code works.

  • [ ] My pull request is based on the latest changes of the master branch.

    No? Unsure? -> execute command git pull --rebase upstream master

@ibacher @pmanko

https://issues.openmrs.org/browse/FM2-130

tendomart avatar Feb 15 '21 09:02 tendomart

@ibacher @pmanko

1 .I just want to know wether this Handler has the required method implementation for doing  the required business. 

2.Would it make sense to design multiple ComplexObsHandler implementations for various MIME Types ?

tendomart avatar Feb 15 '21 10:02 tendomart

oops true .Thanks @corneliouzbett this happened in my last commit yesterday . Prior to that all was well .And i didn't get time to review yesterday .Thanks again

tendomart avatar Apr 07 '21 06:04 tendomart

Thanks @ibacher so then what will we use to map the remaining searchParams as most of the Fhir Media Params have no direct correlations with the Openmrs Obs and no handler implementations from fhir as well .

tendomart avatar Apr 13 '21 11:04 tendomart

@tendomart Hopefully it's pretty straight-forward to create handle...() methods modelled on those from Obs or elsewhere in the code base.

ibacher avatar Apr 21 '21 12:04 ibacher

Alright thanks alot .Sorry for late response , been doing some house cleaning on my Jira Dashboard .

tendomart avatar Apr 21 '21 15:04 tendomart

@ibacher I just want to ask ,is this the new way of , to replace @Qualifier("fhirResources") with @R4Provider

tendomart avatar May 07 '21 09:05 tendomart

Hi @ibacher i have tried to look around for a solution but failed to figure out why

```

@Override public Obs get(@Nonnull String uuid) { return obsService.getObsByUuid(uuid); }

@Override
public Obs createOrUpdate(@Nonnull Obs newEntry) {
	return obsService.saveObs(newEntry, FhirConstants.SAVED_SUCCESSFULLY);
}

@Override
public Obs delete(@Nonnull String uuid) {
	return super.delete(uuid);
}
either throws a NPE or returns a Null Object when actually the same implementation in `FhirConceptDaoImpl` works .Any thoughts.

tendomart avatar May 27 '21 14:05 tendomart

Thanks @ibacher for bringing this up . Iam still finding some trouble defining the search param . I have already identified them at https://www.hl7.org/fhir/DSTU2/media.html but i really don't understand the meaning of the aliases used here in any case .

For example in this case who will be using "c" ,"cd" and "EDT" . And why are you choosing , "concept" , "c.datatype" and "cdt.hl7_abbreviation" ? Only Any clear documentation for this ?

tendomart avatar Jun 06 '21 12:06 tendomart

@tendomart Sorry... I somehow missed the above question. The "c" and "cd" above are really just aliases for tables inside the criteria query. Just like in SQL you could write something like (this is similar to the query my code above is intended to generate):

select *
from concept c
join concept_data_type cdt on
  c.data_type_id = cdt.concept_data_type_id
where cdt.hl7_abbreviation = "ED"

Having an alias just allows us to refer to the property name in a shorter fashion.

The "ED" part actually comes from the code we use to determine whether or not a concept is a complex concept. See here.

ibacher avatar Aug 31 '21 15:08 ibacher