OpenMRSActionProxyService¶
-
public interface
OpenMRSActionProxyService
¶ Proxy registered with the task channel, exposing the OpenMRS service as task actions.
Fields¶
Methods¶
changeStateOfProgramEnrollment¶
-
void
changeStateOfProgramEnrollment
(String configName, String programEnrollmentUuid, DateTime programCompletedDate, String stateUuid, DateTime startDate)¶ Changes state of program enrollment. Program enrollment is identified by UUID.
Parameters: - configName – the name of the configuration
- programEnrollmentUuid – the program enrollment uuid
- programCompletedDate – the program enrollment completed date
- stateUuid – the state uuid
- startDate – the state start date
createEncounter¶
-
Encounter
createEncounter
(String configName, DateTime encounterDatetime, String encounterType, String locationName, String patientUuid, String providerUuid, String visitUuid, String formUuid, Map<String, String> observations)¶ Creates an encounter with the given
encounterDate
,encounterType
,locationName
,patientUuid
,providerUuid
andformId
. The locationName and formId are the only not required fields. Configuration with the givenconfigName
will be used while performing this action.Parameters: - configName – the name of the configuration
- encounterDatetime – the date of encounter
- encounterType – the type of encounter
- locationName – the name of location
- patientUuid – the patient uuid
- providerUuid – the provider uuid
- visitUuid – the visit uuid
- formUuid – the form uuid
- observations – the map of observations where concept Uuid is a key and value from the observation is a value
Returns: the created encounter
createOrUpdateObservationJSON¶
-
Observation
createOrUpdateObservationJSON
(String configName, String observationUuid, String observationJSON, String encounterUuid, String conceptUuid, DateTime obsDatetime, String orderUuid, String comment)¶ Creates an observation from given
observationJSON
. The observationJSON is the only required field. Other params are optional and will overwrite any matching key ofobservationJSON
. Configuration with the givenconfigName
will be used while performing this action.Parameters: - configName – the name of the configuration
- observationJSON – the observation uuid
- observationJSON – the observation in JSON
- encounterUuid – the encounter uuid
- conceptUuid – the concept uuid
- obsDatetime – the observation datetime
- orderUuid – the order uuid
- comment – the comment
Returns: the created observation
createOrder¶
-
Order
createOrder
(String configName, String type, String encounterUuid, String patientUuid, String conceptUuid, String ordererUuid, String careSetting)¶ Creates an order with the given params.
Parameters: - configName – the name of the configuration
- type – the order type
- encounterUuid – the encounter uuid
- patientUuid – the patient uuid
- conceptUuid – the concept uuid
- ordererUuid – the orderer uuid
- careSetting – the care setting value
Returns: the created Order
createPatient¶
-
Patient
createPatient
(String configName, String givenName, String middleName, String familyName, String address1, String address2, String address3, String address4, String address5, String address6, String cityVillage, String stateProvince, String country, String postalCode, String countyDistrict, String latitude, String longitude, DateTime startDate, DateTime endDate, DateTime birthDate, Boolean birthDateEstimated, String gender, Boolean dead, String causeOfDeathUUID, String motechId, String locationForMotechId, Map<String, String> identifiers, Map<String, String> personAttributes)¶ Creates a patient with the given params. The required fields are :
givenName
,familyName
,gender
,motechId
. If the locationName is not provided, the default location will be used. Configuration with the givenconfigName
will be used while performing this action. Returns created patient.Parameters: - configName – the name of the configuration
- givenName – the given name of person
- middleName – the middle name of person
- familyName – the family name of person
- address1 – the first line of person address
- address2 – teh second line of person address
- address3 – the third line of person address
- address4 – the fourth line of person address
- address5 – the fifth line of person address
- address6 – the sixth line of person address
- cityVillage – the city or village of person address
- stateProvince – the state or province of person address
- country – the country of person address
- postalCode – the postal code of person address
- countyDistrict – the county district of person address
- latitude – the latitude of person address
- longitude – the longitude of person address
- startDate – the start date of person address
- endDate – the end date of person address
- birthDate – the person date of birth
- birthDateEstimated – the person birthDateEstimated flag
- gender – the person gender
- dead – the person dead flag
- causeOfDeathUUID – the cause of the death
- motechId – the patient motechId
- locationForMotechId – the location name for identifiers
- identifiers – the additional identifiers to be stored to patient
- personAttributes – the additional attributes of person
Returns: created Patient
createProgramEnrollment¶
-
void
createProgramEnrollment
(String configName, String patientUuid, String programUuid, DateTime dateEnrolled, DateTime dateCompleted, String locationName, Map<String, String> programEnrollmentAttributes)¶ Creates a program enrollment with the given params. The required fields are:
patientUuid
,programUuid
,dateEnrolled
.Parameters: - configName – the name of the configuration
- patientUuid – the patient uuid
- programUuid – the program uuid
- dateEnrolled – the program enrollment date
- dateCompleted – the program completed date
- locationName – the name of location
createVisit¶
-
Visit
createVisit
(String configName, String patientUuid, DateTime startDatetime, DateTime endDatetime, String visitType, String locationName)¶ Creates a visit with the given
patientUuid
,visitStartDatetime
,visitEndDatetime
,visitType
andlocationName
. The locationName and visitType are the only not required field. Configuration with the givenconfigName
will be used while performing this action.Parameters: - configName – the name of the configuration
- patientUuid – the patient uuid
- startDatetime – the start datetime of visit
- endDatetime – the end datetime of visit
- visitType – the type of visit
- locationName – the name of location
fetchAtomFeeds¶
getCohortQueryReport¶
-
void
getCohortQueryReport
(String configName, String cohortQueryUuid, Map<String, String> parameters)¶ Gets the Cohort Query report. The Cohort Query is identified by UUID. The required fields are:
cohortQueryUuid
.Parameters: - configName – the name of the configuration
- cohortQueryUuid – the cohort query uuid
- parameters – the additional parameters
updatePatientIdentifiers¶
-
void
updatePatientIdentifiers
(String configName, String patientUuid, Map<String, String> identifiers)¶ Updates a patient with the given {@patientUuid}. Configuration with the given
configName
will be used while performing this action.Parameters: - configName – the name of the configuration
- patientUuid – the patient uuid
- identifiers – the identifiers to be stored to patient
updatePerson¶
-
void
updatePerson
(String configName, String personUuid, String givenName, String middleName, String familyName, String address1, String address2, String address3, String address4, String address5, String address6, String cityVillage, String stateProvince, String country, String postalCode, String countyDistrict, String latitude, String longitude, DateTime startDate, DateTime endDate, DateTime birthDate, Boolean birthDateEstimated, String gender, Boolean dead, String causeOfDeathUUID, Map<String, String> personAttributes)¶ Updates a person with the given
personUuid
. Configuration with the givenconfigName
will be used while performing this action.Parameters: - configName – the name of the configuration
- personUuid – the person uuid
- givenName – the given name of person
- middleName – the middle name of person
- familyName – the family name of person
- address1 – the first line of person address
- address2 – teh second line of person address
- address3 – the third line of person address
- address4 – the fourth line of person address
- address5 – the fifth line of person address
- address6 – the sixth line of person address
- cityVillage – the city or village of person address
- stateProvince – the state or province of person address
- country – the country of person address
- postalCode – the postal code of person address
- countyDistrict – the county district of person address
- latitude – the latitude of person address
- longitude – the longitude of person address
- startDate – the start date of person address
- endDate – the end date of person address
- birthDate – the person date of birth
- birthDateEstimated – the person birthDateEstimated flag
- gender – the person gender
- dead – the person dead flag
- causeOfDeathUUID – the cause of the death
- personAttributes – the additional attributes of person
updateProgramEnrollment¶
-
void
updateProgramEnrollment
(String configName, String programEnrollmentUuid, DateTime programCompletedDate, String stateUuid, DateTime startDate, Map<String, String> attributes)¶ Updates a Bahmni program enrollment with the given params. The required fields are:
programEnrollmentUuid
.Parameters: - configName – the name of the configuration
- programEnrollmentUuid – the program enrollment uuid
- programCompletedDate – the program enrollment completed date
- stateUuid – the state uuid
- startDate – the state start date
- attributes – the additional attributes