/
Case 4

Case 4

Finding Specific orgUnits / Location by area and SubArea

Searching for specific outlets or locations that exists in the specific area and subareas.

Summary of test results

 

DHIS2

FHIR

DHIS2 vs FHIR %

 

 

DHIS2

FHIR

DHIS2 vs FHIR %

 

Average

0.455769

0.303586

50.13%

 

 

Test detailed results

logged on Dec 1/ 2022 UTC-7 09:40:00

Performance Testing for finding

Attempt

DHIS2 API (s)

FHIR API (s)

Improvement (%)

Performance Testing for finding

Attempt

DHIS2 API (s)

FHIR API (s)

Improvement (%)

El Salvador, Santa Ana, Santa Ana

Attempt 1

0.505833

0.360177

40.44%

 

Attempt 2

0.489221

0.36177

35.23%

 

Attempt 3

0.498737

0.371898

34.11%

Kenya, Nairobi, Dagoretti North

Attempt 1

0.49637

0.280708

76.83%

 

Attempt 2

0.500309

0.275099

81.87%

 

Attempt 3

0.484024

0.274949

76.04%

Nigeria, Kaduna State, Ifedayo LGA

Attempt 1

0.329692

0.288067

14.45%

 

Attempt 2

0.340072

0.280573

21.21%

 

Attempt 3

0.330502

0.275984

19.75%

Nepal, Banepa, Banepa

Attempt 1

0.500502

0.290867

72.07%

 

Attempt 2

0.49083

0.289518

69.53%

 

Attempt 3

0.503132

0.293428

71.47%

Overall Average

 

0.455769

0.303586

50.13%

Testing Script

## Case #4 results4 = [{"description": "Performance Testing for finding","attempt": "Attempt", "dhis2": "DHIS2 API (s)", "fhir": "FHIR API (s)", "improvement": "Improvement (%)"}] print("Case #4 - Measuring time taken to find outlets in area & subArea") improvements = [] dhis2_performances = [] fhir_performances = [] for country in countries: if country['name'] != "Cameroon": for i in range (1,4): result4 = {} if i == 1: result4['description'] = "{}, {}, {}".format(country['name'], country['area'], country['subArea']) result4['attempt'] = "Attempt {}".format(i) dhis2_url = dhis2_base_url+'area={}&areaSub={}'.format(country['area'], country['subArea']) result = requests.get(dhis2_url, auth=dhis2_auth) if result.status_code == 200: dhis2_performances.append(result.elapsed.total_seconds()) result4['dhis2'] = dhis2_performances[-1] request_url = fhir_location_url+'address={}&address-city={}&_count=500'.format(country['area'], country['subArea']) fhirResult = requests.get(request_url, auth=fhir_auth) if fhirResult.status_code == 200: fhir_performances.append(fhirResult.elapsed.total_seconds()) result4['fhir'] = fhir_performances[-1] improvements.append(((dhis2_performances[-1]/fhir_performances[-1])-1)*100) result4['improvement'] = '{}%'.format(float("{:.2f}".format(improvements[-1]))) results4.append(result4) time.sleep(0.01) result4 = {} result4['description'] = "Overall Average" result4['dhis2'] = Average(dhis2_performances) result4['fhir'] = Average(fhir_performances) result4['improvement'] = '{}%'.format(float("{:.2f}".format(((result4['dhis2']/result4['fhir'])-1)*100))) results4.append(result4) print(tabulate(results4, headers='firstrow', tablefmt='pipe'))

 

Related content