-
Notifications
You must be signed in to change notification settings - Fork 3
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 #434 from SEEG-Oxford/healthmap-config-page
Add HealthMap config page
- Loading branch information
Showing
38 changed files
with
1,787 additions
and
207 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,4 @@ | ||
-- Allow healthmap_subdisease to be edited by the platform. | ||
-- | ||
-- Copyright (c) 2015 University of Oxford | ||
GRANT INSERT, UPDATE ON TABLE healthmap_subdisease TO ${application_username}; |
4 changes: 4 additions & 0 deletions
4
db/migrations/1511161511__allow_subdisease_without_parent.sql
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,4 @@ | ||
-- Allow healthmap_subdisease without parent healthmap_disease. | ||
-- | ||
-- Copyright (c) 2015 University of Oxford | ||
ALTER TABLE healthmap_subdisease ALTER COLUMN healthmap_disease_id DROP NOT NULL; |
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
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
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
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
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
25 changes: 25 additions & 0 deletions
25
src/Common/src/uk/ac/ox/zoo/seeg/abraid/mp/common/dto/json/JsonHealthMapDisease.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,25 @@ | ||
package uk.ac.ox.zoo.seeg.abraid.mp.common.dto.json; | ||
|
||
/** | ||
* A JSON DTO used identify a HealthMap disease. | ||
* Copyright (c) 2015 University of Oxford | ||
*/ | ||
public class JsonHealthMapDisease extends JsonNamedEntry { | ||
private JsonNamedEntry abraidDisease; | ||
|
||
public JsonHealthMapDisease() { | ||
} | ||
|
||
public JsonHealthMapDisease(Integer id, String name, JsonNamedEntry abraidDisease) { | ||
super(id, name); | ||
setAbraidDisease(abraidDisease); | ||
} | ||
|
||
public JsonNamedEntry getAbraidDisease() { | ||
return abraidDisease; | ||
} | ||
|
||
public void setAbraidDisease(JsonNamedEntry abraidDisease) { | ||
this.abraidDisease = abraidDisease; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/Common/src/uk/ac/ox/zoo/seeg/abraid/mp/common/dto/json/JsonHealthMapSubDisease.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,26 @@ | ||
package uk.ac.ox.zoo.seeg.abraid.mp.common.dto.json; | ||
|
||
/** | ||
* A JSON DTO used identify a HealthMap subdisease. | ||
* Copyright (c) 2015 University of Oxford | ||
*/ | ||
public class JsonHealthMapSubDisease extends JsonHealthMapDisease { | ||
private JsonNamedEntry parent; | ||
|
||
public JsonHealthMapSubDisease() { | ||
} | ||
|
||
public JsonHealthMapSubDisease( | ||
Integer id, String name, JsonNamedEntry abraidDisease, JsonNamedEntry parent) { | ||
super(id, name, abraidDisease); | ||
setParent(parent); | ||
} | ||
|
||
public JsonNamedEntry getParent() { | ||
return parent; | ||
} | ||
|
||
public void setParent(JsonNamedEntry parent) { | ||
this.parent = parent; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/Common/src/uk/ac/ox/zoo/seeg/abraid/mp/common/dto/json/JsonNamedEntry.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,34 @@ | ||
package uk.ac.ox.zoo.seeg.abraid.mp.common.dto.json; | ||
|
||
/** | ||
* A base JSON dto to represent any object with an ID and name. | ||
* Copyright (c) 2015 University of Oxford | ||
*/ | ||
public class JsonNamedEntry { | ||
private Integer id; | ||
private String name; | ||
|
||
public JsonNamedEntry() { | ||
} | ||
|
||
public JsonNamedEntry(Integer id, String name) { | ||
setId(id); | ||
setName(name); | ||
} | ||
|
||
public Integer getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Integer id) { | ||
this.id = id; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} |
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
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
50 changes: 50 additions & 0 deletions
50
src/Common/src/uk/ac/ox/zoo/seeg/abraid/mp/common/service/core/HealthMapService.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,50 @@ | ||
package uk.ac.ox.zoo.seeg.abraid.mp.common.service.core; | ||
|
||
import uk.ac.ox.zoo.seeg.abraid.mp.common.domain.HealthMapDisease; | ||
import uk.ac.ox.zoo.seeg.abraid.mp.common.domain.HealthMapSubDisease; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Service interface for HealthMap configuration. | ||
* Copyright (c) 2015 University of Oxford | ||
*/ | ||
public interface HealthMapService { | ||
/** | ||
* Gets a HealthMap disease by ID. | ||
* @param id The ID. | ||
* @return The HealthMap disease, or null if not found. | ||
*/ | ||
HealthMapDisease getHealthMapDiseasesById(Integer id); | ||
|
||
/** | ||
* Gets a HealthMap subdisease by ID. | ||
* @param id The ID. | ||
* @return The HealthMap subdisease, or null if not found. | ||
*/ | ||
HealthMapSubDisease getHealthMapSubDiseasesById(Integer id); | ||
|
||
/** | ||
* Gets all HealthMap diseases. | ||
* @return All HealthMap diseases. | ||
*/ | ||
List<HealthMapDisease> getAllHealthMapDiseases(); | ||
|
||
/** | ||
* Gets all HealthMap sub-diseases. | ||
* @return All HealthMap sub-diseases. | ||
*/ | ||
List<HealthMapSubDisease> getAllHealthMapSubDiseases(); | ||
|
||
/** | ||
* Saves a HealthMap disease. | ||
* @param disease The disease to save. | ||
*/ | ||
void saveHealthMapDisease(HealthMapDisease disease); | ||
|
||
/** | ||
* Saves a HealthMap subdisease. | ||
* @param disease The disease to save. | ||
*/ | ||
void saveHealthMapSubDisease(HealthMapSubDisease disease); | ||
} |
Oops, something went wrong.