Versions Compared

Key

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

...

DHIS2

FHIR

DHIS2 vs FHIR %

Average

0.321959321175

0.288276283594

1013.46225%

Test detailed results

logged on Nov 29Dec 1/ 2022 UTC-7 09:1406: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.

354824

327208, 0.

30672

295008, 0.

285624

279619

0.

315723

300612

0.

314456

320108, 0.

300887

293777, 0.

290454

290582

0.

301932

301489

4

-0.

36786

29%

Hospital David King

0.

281725

303942, 0.

302501

288387, 0.

274578

297077

0.

286268

296469

0.

29757

285969, 0.

292199

278561, 0.

293559

274396

0.

294443

279642

-2

6.

8556

02%

Unidad Médica San Miguel (NF047)

0.

29345

287184, 0.

303885

299348, 0.

293392

285113

0.

296909

290548

0.

301669

288675, 0.

289875

282008, 0.

283276

266365

0.

291607

279016

1

4.

78584

13%

Ithare Medical Clinic (10358)

0.

280965

293031, 0.

30126

28064, 0.

288404

289396

0.

29021

287689

0.

308609

275697, 0.

277115

287436, 0.

291449

29041

0.

292391

284514

-0

1.

75164

12%

Korakora Health Centre (13382)

0.

286319

303196, 0.

294106

304112, 0.

295094

301997

0.

29184

303102

0.

287755

28352, 0.

280583

295342, 0.

292913

291901

0.

287084

290254

1

4.

62966

43%

Nimoli Medical Services

0.

294825

28343, 0.

292497

289077, 0.

290636

29045

0.

292653

287652

0.

278407

277361, 0.

268665

284016, 0.

283962

273865

0.

277011

278414

5

3.

34467

32%

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

0.

282455

294931, 0.

286563

305446, 0.

285742

295431

0.

28492

298603

0.

27857

279472, 0.

288755

291679, 0.

288231

278167

0.

285185

283106

-0

5.

0931256

47%

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

0.

462394

454878, 0.

451086

479441, 0.

465332

46623

0.

459604

46685

0.

279865

294771, 0.

288865

291244, 0.

28182

283336

0.

283517

289784

38

61.

3128

1%

LOLA PMS (NG_DISC_PPMV_00019)

0.

438221

463435, 0.

483114

457732, 0.

453608

452672

0.

458314

457946

0.

301126

285396, 0.

283007

272043, 0.

274498

265224

0.

28621

274221

37

67.

5515

0%

Clinique La Sentinelle (LT335)

0.

296026

289978, 0.

303652

288041, 0.

293412

280732

0.

297697

28625

0.

292834

288432, 0.

280616

291099, 0.

29468

276994

0.

289377

285508

2

0.

79479

26%

CSI Lougguere

0.

296919

28805, 0.

290365

286309, 0.

280495

279159

0.

28926

284506

0.

278481

286494, 0.

283242

278248, 0.

29083

27263

0.

284184

279124

1.

75459

93%

Nkouampoer (SU11009-17)

0.

304013

294435, 0.

297413

287067, 0.

298907

300116

0.

300111

293873

0.

294128

2778, 0.

287234

273078, 0.

277734

283296

0.

286365

278058

4

5.

58019

69%

Overall Average

0.

321959

321175

0.

288276

283594

10

13.

462

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] )/ dhis2_averages[-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.01)
case_result = {}
case_result['description'] = "Overall Average"
case_result['dhisAvg'] = Average(dhis2_averages)
case_result['fhirAvg'] = Average(fhir_averages)
case_result['improvement'] = '{}%'.format(float("{:.2f}".format(((case_result['dhisAvg'] - /case_result['fhirAvg'])/case_result['dhisAvg']-1)*100)))
results.append(case_result)
print(tabulate(results, headers='firstrow', tablefmt='pipe'))

...