Skip to content

Commit

Permalink
[mekomsolutions#284] - Support "dispositions" domain
Browse files Browse the repository at this point in the history
  • Loading branch information
mogoodrich committed Oct 25, 2024
1 parent 81b87d6 commit 58b636b
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import org.springframework.beans.factory.annotation.Autowired;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;

public class DispositionsLoaderIntegrationTest extends DomainBaseModuleContextSensitiveTest {

Expand All @@ -22,7 +21,7 @@ public class DispositionsLoaderIntegrationTest extends DomainBaseModuleContextSe

@Test
public void load_shouldLoadDisposition() {
loader.load();
loader.load(); // ignore the test file we are using for the exception test below
assertEquals(5, dispositionService.getDispositions().size());
}

Expand All @@ -37,4 +36,9 @@ public void load_shouldReloadOnMultipleLoads() {
assertEquals(5, dispositionService.getDispositions().size());
}

@Test(expected = RuntimeException.class)
public void load_shouldThrowExceptionInUnsafeMode() throws Exception {
loader.loadUnsafe(null, true);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[
{
"uuid" : "d2d89630-b698-11e2-9e96-0800200c9a66",
"name" : "disposition.death",
"conceptCode" : "org.openmrs.module.emrapi:Death",
"actions" : [
"closeCurrentVisitAction",
"markPatientDeadAction"
],
"additionalObs" : [
{
"label" : "emr.dateOfDeath",
"conceptCode" : "org.openmrs.module.emrapi:Date of death"
}
]
},
{
"uuid" : "66de7f60-b73a-11e2-9e96-0800200c9a66",
"name" : "disposition.admit",
"type" : "ADMIT",
"conceptCode" : "org.openmrs.module.emrapi:Admit to hospital",
"actions" : [ ],
"additionalObs" : [ ]
},
{
"uuid" : "8297651b-4046-11ef-ba6a-0242ac120002",
"name" : "disposition.transfer",
"type" : "TRANSFER",
"conceptCode" : "org.openmrs.module.emrapi:Transfer out of hospital",
"actions" : [ ],
"additionalObs" : [ ]
},
{
"uuid" : "687d966bb-9c91-4886-b8b0-e63361f495f0",
"name" : "disposition.observation",
"conceptCode" : "org.openmrs.module.emrapi:ED Observation",
"keepsVisitOpen" : "true",
"actions" : [ ],
"additionalObs" : [ ]
},
{
"uuid" : "12129630-b698-11e2-9e96-0800200c9a66",
"name" : "disposition.discharge",
"type" : "DISCHARGE",
"conceptCode" : "org.openmrs.module.emrapi:Discharged",
"actions" : [
"closeCurrentVisitAction"
],
"additionalObs" : [ ]
}
]

0 comments on commit 58b636b

Please sign in to comment.