Skip to content

Commit

Permalink
(chore) move location of test disposition file to give explicit test …
Browse files Browse the repository at this point in the history
…name
  • Loading branch information
mogoodrich authored Oct 25, 2024
1 parent 0cc6ecc commit 8b657bf
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public class AwaitingAdmissionVisitQueryEvaluatorTest extends BaseReportingTest
@Before
public void setup() throws Exception {
executeDataSet("baseTestDataset.xml");
dispositionService.setDispositionConfig("testDispositionConfig.json"); // use demo disposition config from test resources
dispositionDescriptor = ContextSensitiveMetadataTestUtils.setupDispositionDescriptor(conceptService, dispositionService);
ContextSensitiveMetadataTestUtils.setupAdmissionDecisionConcept(conceptService, emrApiProperties);
query = new AwaitingAdmissionVisitQuery();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public class MostRecentAdmissionRequestVisitDataEvaluatorTest extends BaseReport
@Before
public void setup() throws Exception {
executeDataSet("baseTestDataset.xml");
dispositionService.setDispositionConfig("testDispositionConfig.json"); // use demo disposition config from test resources
def = new MostRecentAdmissionRequestVisitDataDefinition();
dispositionDescriptor = ContextSensitiveMetadataTestUtils.setupDispositionDescriptor(conceptService, dispositionService);
diagnosisMetadata = ContextSensitiveMetadataTestUtils.setupDiagnosisMetadata(conceptService, emrApiProperties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class DispositionServiceImpl extends BaseOpenmrsService implements Dispos

private PathMatchingResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver();

// TODO inject this in some better way than using a setter to override?
// can be overridden by Initializer starting with Iniz version 2.8.0
private String dispositionConfig = "dispositionConfig.json";

public DispositionServiceImpl(ConceptService conceptService, EmrConceptService emrConceptService) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public boolean evaluate(Object o) {
public void setUp() throws Exception {
executeDataSet("baseTestDataset.xml");
administrationService.setGlobalProperty(EmrApiConstants.GP_INPATIENT_VISIT_EXPIRE_HOURS, "");
dispositionService.setDispositionConfig("testDispositionConfig.json"); // use demo disposition config from test resources
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public class AdtServiceImplTest extends EmrApiContextSensitiveTest {
@Before
public void setup() throws Exception {
executeDataSet("baseTestDataset.xml");
dispositionService.setDispositionConfig("testDispositionConfig.json"); // use demo disposition config from test resources
dispositionDescriptor = ContextSensitiveMetadataTestUtils.setupDispositionDescriptor(conceptService, dispositionService);
ContextSensitiveMetadataTestUtils.setupAdmissionDecisionConcept(conceptService, emrApiProperties);
visitLocation = testDataManager.location().name("Hospital").tag("Visit Location").save();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public void setUp(){

dispositionService = new DispositionServiceImpl(concertService, emrConceptService);
dispositionService.setDispositionDescriptor(dispositionDescriptor);
dispositionService.setDispositionConfig("testDispositionConfig.json"); // use demo disposition config from test resources
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public class MaternalServiceImplTest extends EmrApiContextSensitiveTest {
@Before
public void setUp() {
executeDataSet("baseTestDataset.xml");
dispositionService.setDispositionConfig("testDispositionConfig.json"); // use demo disposition config from test resources
ContextSensitiveMetadataTestUtils.setupDispositionDescriptor(conceptService, dispositionService);
ContextSensitiveMetadataTestUtils.setupAdmissionDecisionConcept(conceptService, emrApiProperties);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public class VisitDomainWrapperComponentTest extends EmrApiContextSensitiveTest
@Before
public void setup() throws Exception {
executeDataSet("baseTestDataset.xml");
dispositionService.setDispositionConfig("testDispositionConfig.json"); // use demo disposition config from test resources
dispositionDescriptor = ContextSensitiveMetadataTestUtils.setupDispositionDescriptor(conceptService, dispositionService);
ContextSensitiveMetadataTestUtils.setupAdmissionDecisionConcept(conceptService, emrApiProperties);
ContextSensitiveMetadataTestUtils.setupDiagnosisMetadata(conceptService, emrApiProperties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public class EmrApiConfigurationControllerTest extends BaseModuleWebContextSensi
@Before
public void setUp() {
executeDataSet("baseTestDataset.xml");
dispositionService.setDispositionConfig("testDispositionConfig.json"); // use demo disposition config from test resources
request = new MockHttpServletRequest();
response = new MockHttpServletResponse();
}
Expand Down

0 comments on commit 8b657bf

Please sign in to comment.