forked from openmrs/openmrs-module-emrapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from esaude/MPOC-267
Sushant | MPOC-267 Allergies section
- Loading branch information
Showing
32 changed files
with
1,684 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?xml version="1.0"?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.openmrs.module</groupId> | ||
<artifactId>emrapi</artifactId> | ||
<version>1.28.0-SNAPSHOT</version> | ||
</parent> | ||
<groupId>org.openmrs.module</groupId> | ||
<artifactId>emrapi-Allergy</artifactId> | ||
<version>1.28.0-SNAPSHOT</version> | ||
<name>EMR API Allergy</name> | ||
|
||
<url>http://maven.apache.org</url> | ||
|
||
<properties> | ||
<openMRSVersion>1.10.2</openMRSVersion> | ||
</properties> | ||
|
||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.openmrs.api</groupId> | ||
<artifactId>openmrs-api</artifactId> | ||
<version>${openMRSVersion}</version> | ||
<scope>provided</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>javassist</groupId> | ||
<artifactId>javassist</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.openmrs.api</groupId> | ||
<artifactId>openmrs-api</artifactId> | ||
<type>test-jar</type> | ||
<version>${openMRSVersion}</version> | ||
<scope>test</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>javassist</groupId> | ||
<artifactId>javassist</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.openmrs.test</groupId> | ||
<artifactId>openmrs-test</artifactId> | ||
<version>${openMRSVersion}</version> | ||
<type>pom</type> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
|
||
<testResources> | ||
<testResource> | ||
<directory>src/test/resources</directory> | ||
<includes> | ||
<include>**/*.properties</include> | ||
<include>**/*.xml</include> | ||
</includes> | ||
<filtering>true</filtering> | ||
</testResource> | ||
<testResource> | ||
<directory>src/test/resources</directory> | ||
<excludes> | ||
<exclude>**/*.properties</exclude> | ||
<exclude>**/*.xml</exclude> | ||
</excludes> | ||
<filtering>false</filtering> | ||
</testResource> | ||
</testResources> | ||
</build> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.Allergy; | ||
|
||
/** | ||
* Hello world! | ||
* | ||
*/ | ||
public class App | ||
{ | ||
public static void main( String[] args ) | ||
{ | ||
System.out.println( "Hello World!" ); | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
Allergy/src/main/java/org/openmrs/module/emrapi/allergy/AllergyHistory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package org.openmrs.module.emrapi.allergy; | ||
|
||
import java.util.List; | ||
|
||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.openmrs.Concept; | ||
import org.openmrs.module.emrapi.allergy.Allergy_New; | ||
|
||
public class AllergyHistory { | ||
private String nonCodedAllergy; | ||
|
||
private Concept allergy; | ||
|
||
private List<Allergy_New> allergy_News; | ||
|
||
public String getNonCodedAllergy() { | ||
return nonCodedAllergy; | ||
} | ||
|
||
public void setNonCodedAllergy(String nonCodedAllergy) { | ||
this.nonCodedAllergy = nonCodedAllergy; | ||
} | ||
|
||
public Concept getAllergy() { | ||
return allergy; | ||
} | ||
|
||
public void setAllergy(Concept allergy) { | ||
this.allergy = allergy; | ||
} | ||
|
||
public List<Allergy_New> getAllergies() { | ||
return allergy_News; | ||
} | ||
|
||
public void setAllergies(List<Allergy_New> allergy_News) { | ||
this.allergy_News = allergy_News; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
String name = nonCodedAllergy; | ||
if (name != null && allergy != null && allergy.getName() != null) { | ||
name = allergy.getName().getName(); | ||
} | ||
|
||
return new ToStringBuilder(this).append("allergy", name).append("count", allergy_News.size()).build(); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
Allergy/src/main/java/org/openmrs/module/emrapi/allergy/AllergyListConstant.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.openmrs.module.emrapi.allergy; | ||
|
||
import org.apache.commons.logging.Log; | ||
import org.apache.commons.logging.LogFactory; | ||
|
||
|
||
public class AllergyListConstant { | ||
|
||
private static Log log = LogFactory.getLog(AllergyListConstant.class); | ||
|
||
public static final String GP_END_REASON_CONCEPT_SET_UUID = "alergyList.endReasonConceptSetUuid"; | ||
|
||
public static final String GLOBAL_PROPERTY_NON_CODED_UUID = "alergyList.nonCodedUuid"; | ||
} |
28 changes: 28 additions & 0 deletions
28
Allergy/src/main/java/org/openmrs/module/emrapi/allergy/AllergyService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.openmrs.module.emrapi.allergy; | ||
|
||
import java.util.List; | ||
|
||
import org.openmrs.Concept; | ||
import org.openmrs.Patient; | ||
import org.openmrs.annotation.Authorized; | ||
import org.openmrs.api.OpenmrsService; | ||
|
||
|
||
@Deprecated | ||
public interface AllergyService extends OpenmrsService { | ||
|
||
@Authorized({ PrivilegeAllergyConstant.EDIT_ALLERGIES }) | ||
Allergy_New save(Allergy_New allergy_New); | ||
|
||
@Authorized({ PrivilegeAllergyConstant.EDIT_ALLERGIES }) | ||
Allergy_New voidAllergy(Allergy_New allergy_New, String voidReason); | ||
|
||
Allergy_New getAllergyByUuid(String uuid); | ||
|
||
List<AllergyHistory> getAllergyHistory(Patient patient); | ||
|
||
@Authorized({ PrivilegeAllergyConstant.GET_ALLERGIES }) | ||
List<Allergy_New> getActiveAllergy(Patient patient); | ||
|
||
List<Concept> getEndReasonConcepts(); | ||
} |
Oops, something went wrong.