-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
O3-3193: REST API for EMR API ADT functionality
O3-3467: REST API - Create EmrApiConfig endpoint
- Loading branch information
1 parent
002dc30
commit 4bcea85
Showing
6 changed files
with
198 additions
and
20 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
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
27 changes: 27 additions & 0 deletions
27
omod/src/main/java/org/openmrs/module/emrapi/web/controller/EmrApiConfigController.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,27 @@ | ||
package org.openmrs.module.emrapi.web.controller; | ||
|
||
import org.openmrs.module.emrapi.EmrApiProperties; | ||
import org.openmrs.module.webservices.rest.SimpleObject; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestMethod; | ||
import org.springframework.web.bind.annotation.ResponseBody; | ||
|
||
@Controller | ||
@RequestMapping(value = "/rest/emrapi/configuration") | ||
public class EmrApiConfigController { | ||
|
||
@Autowired | ||
private EmrApiProperties emrApiProperties; | ||
@RequestMapping(method = RequestMethod.GET) | ||
@ResponseBody | ||
public SimpleObject getEmrApiConfig() { | ||
SimpleObject response = new SimpleObject(); | ||
response.put("admissionEncounterType", emrApiProperties.getAdmissionEncounterType().getUuid()); | ||
response.put("transferWithinHospitalEncounterType", emrApiProperties.getTransferWithinHospitalEncounterType().getUuid()); | ||
response.put("exitFromInpatientEncounterTpye", emrApiProperties.getExitFromInpatientEncounterType().getUuid()); | ||
return response; | ||
} | ||
|
||
} |
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