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

FM2-136 : Fhir appointment resource initial implementation #29

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jecihjoy
Copy link

Implemented translations for the following properties

  1. Uuid
  2. Appointment start time
  3. Appointment end time
  4. Appointment status
  5. Comment
  6. Date created
  7. Date updated

This PR is linked to this ticket https://issues.openmrs.org/projects/FM2/issues/FM2-136

@CLAassistant
Copy link

CLAassistant commented Apr 20, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@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.

@jecihjoy I've added some comments here on things I think should be changed. Let me know what you think.


<groupId>org.openmrs.module</groupId>
<artifactId>fhir2-appointment-api</artifactId>
<version>${openmrsModuleFhirVersion}</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't the version here inherit from the parent module, i.e., be tied to the Bahmni appointment module version rather than the FHIR module version?

Comment on lines +69 to +84
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
</plugin>
Copy link
Contributor

Choose a reason for hiding this comment

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

While we use these plugins inside the FHIR2 module, I'd hesitate about using them here, since they aren't defined in the parent POM, so they're missing all the configuration we do. Also, that configuration may not align with Bahmni's coding standards.

</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
Copy link
Contributor

Choose a reason for hiding this comment

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

You should define a version here, since Lombok isn't defined in the parent POM.

@Primary
@Component
@Transactional
@Setter(AccessLevel.PACKAGE)
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't doing anything here if you define the setters (which is fine).

@Setter(AccessLevel.PACKAGE)
public class FhirBahmniAppointmentServiceImpl implements FhirAppointmentService {

@Autowired
Copy link
Contributor

Choose a reason for hiding this comment

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

If you have setters defined, I would put the @Autowired annotation on them, rather than relying on field annotation.

@@ -25,6 +26,8 @@
<jacocoVersion>0.7.9</jacocoVersion>
<openmrsAtomfeedVersion>2.5.6</openmrsAtomfeedVersion>
<atomfeed.version>1.9.4</atomfeed.version>
<lombokVersion>1.18.10</lombokVersion>
<openmrsModuleFhirVersion>1.0.0-SNAPSHOT</openmrsModuleFhirVersion>
Copy link
Contributor

Choose a reason for hiding this comment

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

This property probably belongs in the submodule rather than here.

@@ -25,6 +26,8 @@
<jacocoVersion>0.7.9</jacocoVersion>
<openmrsAtomfeedVersion>2.5.6</openmrsAtomfeedVersion>
<atomfeed.version>1.9.4</atomfeed.version>
<lombokVersion>1.18.10</lombokVersion>
Copy link
Contributor

Choose a reason for hiding this comment

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

This property probably belongs in the submodule rather than here.

@@ -16,6 +16,10 @@
<require_module version="${openmrsAtomfeedVersion}">org.ict4h.openmrs.openmrs-atomfeed</require_module>
</require_modules>

<aware_of_modules>
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to add to this:

<conditionalResources>
	<conditionalResource>
		<path>/lib/fhir2-appointment-api-${project.parent.version}.jar</path>
		<loadIfModulesPresent>
			<openmrsModule>
				<moduleId>org.openmrs.module.fhir2</moduleId>
				<version>1.*</version>
			</openmrsModule>
		</loadIfModulesPresent>
	</conditionalResource>
</conditionalResources>

So that the FHIR-specific stuff is only loaded if the FHIR module is present.

Choose a reason for hiding this comment

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

First, you will have to upgrade the config.xml DTD file version from 1.2 to 1.6
Either this

<!DOCTYPE module PUBLIC "-//OpenMRS//DTD OpenMRS Config 1.0//EN"
		"https://resources.openmrs.org/doctype/config-1.6.dtd">

or
<module configVersion="1.6">
This is because loadIfModulesPresent was introduced in version 1.6 Also, conditionalResources

Comment on lines +23 to +25
@Autowired
AppointmentServiceDefinitionService appointmentServiceDefinitionService;

Choose a reason for hiding this comment

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

You forgot to add private modifier

Comment on lines +326 to +337












Choose a reason for hiding this comment

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

Remove the blank lines

import org.openmrs.module.fhir2.FhirConstants;

@NoArgsConstructor
public class AppointmentFhirConstants extends FhirConstants {

Choose a reason for hiding this comment

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

Why do you need to extend FhirConstants and you already have fhir2-api as a dependency?

@sherrif10
Copy link

@corneliouzbett Feel free to close PR FM2-136 , I hope we also need to back up with other sub tickets, i mean other sub tickets should be pushed in reference to this ticket in bamnhi not on openmrs right?

@jecihjoy
Copy link
Author

jecihjoy commented Feb 4, 2021

@corneliouzbett Feel free to close PR FM2-136 , I hope we also need to back up with other sub tickets, i mean other sub tickets should be pushed in reference to this ticket in bamnhi not on openmrs right?

yes @sherrif10 all appointment translations logic were supposed to be done against this repository, do you wish to join efforts so that we can work on this together?

@sherrif10
Copy link

sherrif10 commented Feb 4, 2021 via email

jecihjoy pushed a commit to jecihjoy/openmrs-module-appointments that referenced this pull request Jan 22, 2024
Update module group id for kenyaemr form
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.

5 participants