|
| 1 | +# EMRAPI Configuration |
| 2 | + |
| 3 | +## EMR API Configuration Overview |
| 4 | + |
| 5 | +The EMR API module provides several high-level APIs and configuration settings. The configuration endpoint provided by the `emrapi` module enables RESTful access to these configuration values. |
| 6 | + |
| 7 | +## Available operations for EMRAPI Configuration |
| 8 | + |
| 9 | +1. [Get EMRAPI Configuration](#get-emrapi-configuration) |
| 10 | + |
| 11 | +## Get EMRAPI Configuration |
| 12 | + |
| 13 | +> Get EMRAPI configuration |
| 14 | +
|
| 15 | +```shell |
| 16 | +GET /openmrs/ws/rest/v1/emrapi/configuration |
| 17 | +``` |
| 18 | + |
| 19 | +```java |
| 20 | + |
| 21 | +OkHttpClient client = new OkHttpClient().newBuilder() |
| 22 | + .build(); |
| 23 | +Request request = new Request.Builder() |
| 24 | + .url("/openmrs/ws/rest/v1/emrapi/configuration") |
| 25 | + .method("GET", null) |
| 26 | + .addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=") |
| 27 | + .addHeader("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010") |
| 28 | + .build(); |
| 29 | +Response response = client.newCall(request).execute(); |
| 30 | +``` |
| 31 | + |
| 32 | +```javascript |
| 33 | + |
| 34 | +var requestHeaders = new Headers(); |
| 35 | +requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM="); |
| 36 | +requestHeaders.append("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010"); |
| 37 | + |
| 38 | +var requestOptions = { |
| 39 | + method: 'GET', |
| 40 | + headers: requestHeaders, |
| 41 | + redirect: 'follow' |
| 42 | +}; |
| 43 | + |
| 44 | +fetch("/openmrs/ws/rest/v1/emrapi/configuration", requestOptions) |
| 45 | + .then(response => response.text()) |
| 46 | + .then(result => console.log(result)) |
| 47 | + .catch(error => console.log('error', error)); |
| 48 | +``` |
| 49 | + |
| 50 | +> Success Response |
| 51 | +
|
| 52 | +```response |
| 53 | +{ |
| 54 | + "metadataSourceName": string, |
| 55 | + "orderingProviderEncounterRole": encounterRole, |
| 56 | + "supportsTransferLocationTag": locationTag, |
| 57 | + "unknownLocation": location, |
| 58 | + "denyAdmissionConcept": concept, |
| 59 | + "admissionForm": form, |
| 60 | + "exitFromInpatientEncounterType": encounterType, |
| 61 | + "extraPatientIdentifierTypes": patientIdentifierType[], |
| 62 | + "consultFreeTextCommentsConcept": concept, |
| 63 | + "sameAsConceptMapType": conceptMapType, |
| 64 | + "testPatientPersonAttributeType": personAttributeType, |
| 65 | + "admissionDecisionConcept": concept, |
| 66 | + "supportsAdmissionLocationTag": locationTag, |
| 67 | + "checkInEncounterType": encounterType, |
| 68 | + "transferWithinHospitalEncounterType": encounterType, |
| 69 | + "suppressedDiagnosisConcepts": concept[], |
| 70 | + "primaryIdentifierType": patientIdentifierType, |
| 71 | + "nonDiagnosisConceptSets": concept[], |
| 72 | + "fullPrivilegeLevel": role, |
| 73 | + "unknownProvider": provider, |
| 74 | + "diagnosisSets": concept[], |
| 75 | + "personImageDirectory": string, |
| 76 | + "visitNoteEncounterType": encounterType, |
| 77 | + "consultEncounterType": encounterType, |
| 78 | + "diagnosisMetadata": { |
| 79 | + "diagnosisCertaintyConcept": concept, |
| 80 | + "diagnosisOrderConcept": concept, |
| 81 | + "codedDiagnosisConcept": concept, |
| 82 | + "nonCodedDiagnosisConcept": concept, |
| 83 | + "diagnosisSetConcept": concept |
| 84 | + }, |
| 85 | + "narrowerThanConceptMapType": conceptMapType, |
| 86 | + "clinicianEncounterRole": encounterRole, |
| 87 | + "conceptSourcesForDiagnosisSearch": conceptSource[], |
| 88 | + "patientDiedConcept": concept, |
| 89 | + "emrApiConceptSource": conceptSource, |
| 90 | + "lastViewedPatientSizeLimit": integer, |
| 91 | + "identifierTypesToSearch": patientIdentifierType[], |
| 92 | + "telephoneAttributeType": personAttributeType, |
| 93 | + "checkInClerkEncounterRole": encounterRole, |
| 94 | + "dischargeForm": form, |
| 95 | + "unknownCauseOfDeathConcept": concept, |
| 96 | + "visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary": boolean, |
| 97 | + "atFacilityVisitType": visitType, |
| 98 | + "visitExpireHours": integer, |
| 99 | + "admissionEncounterType": encounterType, |
| 100 | + "dispositions": [ |
| 101 | + { |
| 102 | + "uuid": string, |
| 103 | + "name": string, |
| 104 | + "conceptCode": string, |
| 105 | + "type: string, |
| 106 | + "careSettingTypes": string[], |
| 107 | + "encounterTypes": string[], |
| 108 | + "excludedEncounterTypes": string[], |
| 109 | + "keepsVisitOpen": boolean, |
| 110 | + "actions": string[], |
| 111 | + "additionalObs": [ |
| 112 | + { |
| 113 | + "label": string, |
| 114 | + "conceptCode: string, |
| 115 | + "params: map<string, string> |
| 116 | + } |
| 117 | + ], |
| 118 | + } |
| 119 | + ], |
| 120 | + "dispositionDescriptor": { |
| 121 | + "admissionLocationConcept": concept, |
| 122 | + "dateOfDeathConcept": concept, |
| 123 | + "dispositionConcept": concept, |
| 124 | + "internalTransferLocationConcept": concept, |
| 125 | + "dispositionSetConcept": concept |
| 126 | + }, |
| 127 | + "highPrivilegeLevel": role, |
| 128 | + "supportsLoginLocationTag": locationTag, |
| 129 | + "unknownPatientPersonAttributeType": personAttributeType, |
| 130 | + "supportsVisitsLocationTag": locationTag, |
| 131 | + "transferForm": form |
| 132 | +} |
| 133 | +``` |
| 134 | + |
| 135 | +### Supported Parameters: |
| 136 | + |
| 137 | +* `v`: optional, defaults to `ref`. This allows specifying the desired representation of ref | default | full | custom |
| 138 | + |
| 139 | +The endpoint supports all standard representations (ref, default, full, and custom). If no representation is specified, the `ref` is returned. |
| 140 | +For any given representation, all properties are returned with the given representation. |
| 141 | +A custom representation can be used to retrieve only specific properties of interest, and specific data within those representations. |
0 commit comments