File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1+ import { HL7_CONDITION_CATEGORY_CONDITION_CODE } from './fhir' ;
2+
13const BASE_PATH = process . env . PUBLIC_URL || '/' ;
24const OPENMRS_FHIR_R4 = '/openmrs/ws/fhir2/R4' ;
35const OPENMRS_REST_V1 = '/openmrs/ws/rest/v1' ;
@@ -13,7 +15,8 @@ export const BUNDLED_TRANSLATIONS_URL_TEMPLATE = (lang: string) =>
1315export const PATIENT_RESOURCE_URL = ( patientUUID : string ) =>
1416 OPENMRS_FHIR_R4 + `/Patient/${ patientUUID } ?_summary=data` ;
1517export const PATIENT_CONDITION_RESOURCE_URL = ( patientUUID : string ) =>
16- OPENMRS_FHIR_R4 + `/Condition?patient=${ patientUUID } ` ;
18+ OPENMRS_FHIR_R4 +
19+ `/Condition?category=${ HL7_CONDITION_CATEGORY_CONDITION_CODE } &patient=${ patientUUID } ` ;
1720export const PATIENT_ALLERGY_RESOURCE_URL = ( patientUUID : string ) =>
1821 OPENMRS_FHIR_R4 + `/AllergyIntolerance?patient=${ patientUUID } ` ;
1922export const PATIENT_ENCOUNTER_RESOURCE_URL = ( patientUUID : string ) =>
Original file line number Diff line number Diff line change 11export const FHIR_ENCOUNTER_TYPE_CODE_SYSTEM =
22 'http://fhir.openmrs.org/code-system/encounter-type' ;
3+ export const HL7_CONDITION_CATEGORY_CONDITION_CODE = 'problem-list-item' ;
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ describe('conditionService', () => {
3434 const result = await getPatientConditionsBundle ( patientUUID ) ;
3535
3636 expect ( get ) . toHaveBeenCalledWith (
37- `/openmrs/ws/fhir2/R4/Condition?patient=${ patientUUID } ` ,
37+ `/openmrs/ws/fhir2/R4/Condition?category=problem-list-item& patient=${ patientUUID } ` ,
3838 ) ;
3939 expect ( result ) . toEqual ( mockConditionBundle ) ;
4040 } ) ;
@@ -59,7 +59,7 @@ describe('conditionService', () => {
5959 const result = await getConditions ( patientUUID ) ;
6060
6161 expect ( get ) . toHaveBeenCalledWith (
62- `/openmrs/ws/fhir2/R4/Condition?patient=${ patientUUID } ` ,
62+ `/openmrs/ws/fhir2/R4/Condition?category=problem-list-item& patient=${ patientUUID } ` ,
6363 ) ;
6464 expect ( result ) . toEqual ( [ mockCondition ] ) ;
6565 } ) ;
You can’t perform that action at this time.
0 commit comments