BBahmni 한국어 매뉴얼검색
한국어 번역 완료
한국어English

API to display form builder forms(forms 2.0) for a patient in dashboard

Existing form display control doesn't show the form builder forms because the existing API considers only the 'All Observation Template' forms. So a new API is introduced, which fetches form builder form details for a patient.

Request:

https://<machine-ip>/openmrs/ws/rest/v1/bahmnicore/patient/<patient-uuid>/forms?formType=v1&numberOfVisits=2&visitUuid=<visit-uuid>&patientProgramUuid=<uuid>

Response:

[
    {
        "formType": "v2",
        "formName": "groovy_test",
        "formVersion": 1,
        "visitUuid": "8a34eb02-b5d2-485f-b711-f2898ac86e93",
        "visitStartDateTime": 1536733420000,
        "encounterUuid": "b3f7a082-c45c-4679-860d-80d48de639a2",
        "encounterDateTime": 1539586861000,
        "providers": [
            {
                "providerName": "Super Man",
                "uuid": "c1c21e11-3f10-11e4-adec-0800271c1b75"
            }
        ]
    },
    ]

Criteria:

  1. patient_uuid is mandatory
  2. formType is optional with possible values are v1 and v2. By default it assumes v2. v1 means forms 1.0 i.e all observation template forms(it is not implemented) and v2 means form builder forms
  3. numberOfVisits is optional
  4. visitUuid is optional, numberOfVisits won&rsquo;t apply with this parameter
  5. patientProgramUuid is optional, numberOfVisits won&rsquo;t apply with this parameter. It works along with visitUuid if provided

Opemrs talk: https://talk.openmrs.org/t/api-to-fetch-form-builder-forms-for-a-patient/20564

원문 정보

Bahmni Wiki · CC BY-SA 4.0

원문 보기 ↗