...
- Check your xls form and make sure that there is no row with missing openmrs_entity_id
- Review xls form and make sure that no new person exists without mandatory openmrs attribute mappings (first_name, last_name, gender,birth_date, atleast one patient_identifier)
- Encounter mappings encounter_location and encounter_date for form also exist and if form registers multiple entities encounter type for new entities is also specified in repeat group in column openmrs_entity_id.
- If none of the above exist contact developers with full stacktrace and the steps to reproduce the problem.
2) java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 400 for URL: http://46.101.51.199:8080/openmrs/ws/rest/v1/patient
at org.opensrp.connector.HttpUtil.post
Possible Reason:
- The FormSubmission is submitted to create / register a person in OpenMRS 2nd time.
- Any property of person that is supposed to be unique like any of the identifier, entityId has been duplicated
- Person is missing any important mapping in xlsform or in Json data being pushed to server like first_name, last_name, gender, birth_date, person_identifier, identifier_type etc.
- If an identifier is supposed to be bind to location (this is done when creating identifier type) then missing location in identifier can also lead to this exception
- If an identifier was marked as "required" when creating identifier type, it must be specified when creating patient
Solutions:
- Check that The entityId in FormSubmission is not already registered in OpenMRS
- Check that any identifier value (mapped by openmrs_entity=person_identifier) doesnot exists in OpenMRS
- Check your xls form and make sure that there is no row with missing openmrs_entity_id
- Check that xlsform has correct mappings of openmrs_entity and openmrs_entity_id for first_name, last_name, gender, birth_date, identifier which are also marked as "required=yes"
- Check that your Json pushed to server has location mapped in identifier if a particular identifier is supposed to have associated location
- Check that your Json pushed to data has all required identifiers properly specified