Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

DHIS2

FHIR

DHIS2 vs FHIR %

Average

0.325792321175

0.289665 283594

11213.67125%

Test detailed results

logged on Nov 22Dec 1/ 2022 UTC-7 2109:3206:00

Performance Testing for finding

PSI's DHIS2 API (s)

DHIS2 Average (s)

FHIR API (s)

FHIR Average (s)

Improvement (%)

Clínica Dra. Cintya Iraheta

0.

289601

327208, 0.

29368

295008, 0.

297439

279619

0.

293573

300612

0.

287387

320108, 0.

284214

293777, 0.

286099

290582

0.

2859

301489

102

-0.

684

29%

Hospital David King

0.

301669

303942, 0.

296243

288387, 0.

293839

297077

0.

29725

296469

0.

28886

285969, 0.

284253

278561, 0.

290717

274396

0.

287943

279642

103

6.

232

02%

Unidad Médica San Miguel (NF047)

0.

300455

287184, 0.

294747

299348, 0.

291286

285113

0.

295496

290548

0.

283442

288675, 0.

298393

282008, 0.

283852

266365

0.

288562

279016

102

4.

403

13%

Ithare Medical Clinic (10358)

0.

297215

293031, 0.

299505

28064, 0.

315358

289396

0.

304026

287689

0.

295696

275697, 0.

290793

287436, 0.

294299

29041

0.

293596

284514

103

1.

553

12%

Korakora Health Centre (13382)

0.

291213

303196, 0.

311348

304112, 0.

305398

301997

0.

302653

303102

0.

303343

28352, 0.

284562

295342, 0.

280839

291901

0.

289581

290254

104

4.

514

43%

Nimoli Medical Services

0.

291228

28343, 0.

298138

289077, 0.

293967

29045

0.

294444

287652

0.

29668

277361, 0.

292341

284016, 0.

281861

273865

0.

290294

278414

101

3.

43

32%

Adina Pharamacy - House 3, Road 1, FHA Estate, Lugbe

0.

28111

294931, 0.

293731

305446, 0.

28701

295431

0.

287284

298603

0.

295948

279472, 0.

288929

291679, 0.

293254

278167

0.

29271

283106

98

5.

1461

47%

Ajingi Primary Health Centre (fc-00-00-0069)

0.

467752

454878, 0.

453711

479441, 0.

466352

46623

0.

462605

46685

0.

287497

294771, 0.

279707

291244, 0.

285522

283336

0.

284242

289784

162

61.

75

1%

LOLA PMS (NG_DISC_PPMV_00019)

0.

454966

463435, 0.

45816

457732, 0.

545093

452672

0.

486073

457946

0.

290566

285396, 0.

279135

272043, 0.

284843

265224

0.

284848

274221

170

67.

643

0%

Clinique La Sentinelle (LT335)

0.

304852

289978, 0.

288982

288041, 0.

29119

280732

0.

295008

28625

0.

293149

288432, 0.

280753

291099, 0.

293316

276994

0.

289073

285508

102

0.

053

26%

CSI Lougguere

0.

298243

28805, 0.

307467

286309, 0.

290383

279159

0.

298698

284506

0.

292592

286494, 0.

296005

278248, 0.

291305

27263

0.

293301

279124

101

1.

84

93%

Nkouampoer (SU11009-17)

0.

288722

294435, 0.

284976

287067, 0.

303493

300116

0.

292397

293873

0.

29152

2778, 0.

289336

273078, 0.

306926

283296

0.

295927

278058

98

5.

807

69%

Overall Average

0.

325792

321175

0.

289665

283594

112

13.

671

25%

Testing Script

Code Block
breakoutModewide
languagepy
## Case #3
results = [{"description": "Performance Testing for finding", "dhis2": "PSI's DHIS2 API (s)", "dhisAvg": "DHIS2 Average (s)", "fhir": "FHIR API (s)", "fhirAvg": "FHIR Average (s)", "improvement": "Improvement (%)"}]
print("Case #3 - Measuring time taken to find a specific OrgUnit / Location")
outlets = [{"id": "Fz5NHHnah7C", "name": "Clínica Dra. Cintya Iraheta"},{"id": "onUMfZs0zeh", "name": "Hospital David King"},{"id": "kJ14ifcScdC", "name": "Unidad Médica  San Miguel (NF047)"},{"id": "LhNO7Q1tgck", "name": "Ithare Medical Clinic (10358)"},{"id": "V0Wh2NxXpeP", "name": "Korakora Health Centre (13382)"},{"id": "TIqvGd9EDw4", "name": "Nimoli Medical Services"},{"id": "rLBXeooeab7", "name": "Adina Pharamacy - House 3, Road 1, FHA Estate, Lugbe"},{"id": "FQ7cbWDi2Sq", "name": "Ajingi Primary Health Centre (fc-00-00-0069)"},{"id": "iEEsjVZWZXN", "name": "LOLA PMS (NG_DISC_PPMV_00019)"},{"id": "LaosQn5Ir4Q", "name": "Clinique La Sentinelle (LT335)"},{"id": "QLUHuYeU7aT", "name": "CSI Lougguere"},{"id": "IXageW1Ti5E", "name": "Nkouampoer (SU11009-17)"}]
dhis2_averages = []
fhir_averages = []
improvements = []
for outlet in outlets:
    improvement_overall = 0
    case_result = {}
    attempts = []
    fhir_attempts = []
    for i in range (1,4):
        case_result['description'] = "{}".format(outlet['name'])
        dhis2_url = dhis2_base_url+'uid={}'.format(outlet['id'])
        result = requests.get(dhis2_url, auth=dhis2_auth)
        if result.status_code == 200:
            dhis2_performances.append(result.elapsed.total_seconds())
            attempts.append(result.elapsed.total_seconds())
        
        request_url = fhir_location_url+'identifier={}'.format(outlet['id'])
        fhirResult = requests.get(request_url, auth=fhir_auth)
        if fhirResult.status_code == 200:
            fhir_attempts.append(fhirResult.elapsed.total_seconds())
    case_result['dhis2'] = ",  ".join([str(i) for i in attempts])
    dhis2_averages.append(Average(attempts))
    fhir_averages.append(Average(fhir_attempts))
    improvements.append(((dhis2_averages[-1] / fhir_averages[-1])-1)*100)
    case_result['dhisAvg'] = dhis2_averages[-1]
    case_result['fhir'] = ', '.join([str(i) for i in fhir_attempts])
    case_result['fhirAvg'] = fhir_averages[-1]
    case_result['improvement'] = '{}%'.format(float("{:.2f}".format(improvements[-1])))
    results.append(case_result)
    time.sleep(0.101)
case_result = {}
case_result['description'] = "Overall Average"
case_result['dhisAvg'] = Average(dhis2_averages)
case_result['fhirAvg'] = Average(fhir_averages)
case_result['improvement'] = Average(improvements'{}%'.format(float("{:.2f}".format(((case_result['dhisAvg']/case_result['fhirAvg'])-1)*100)))
results.append(case_result)
print(tabulate(results, headers='firstrow', tablefmt='pipe'))

...