Versions Compared

Key

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

...

DHIS2

FHIR

DHIS2 vs FHIR %

Average

0.325792323108

0.289665 286697

1128.6715837

Test detailed results

logged on Nov 2229/ 2022 UTC-7 2109:3203: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

337506, 0.

29368

286636, 0.

297439

29676

0.

293573

306967

0.

287387

322618, 0.

284214

292195, 0.

286099

276949

0.

2859

297254

102

3.

684

16429

Hospital David King

0.

301669

304111, 0.

296243

304274, 0.

293839

305908

0.

29725

304764

0.

28886

282915, 0.

284253

285814, 0.

290717

293968

0.

287943

287566

103

5.

232

64327

Unidad Médica San Miguel (NF047)

0.

300455

290758, 0.

294747

292999, 0.

291286

282317

0.

295496

288691

0.

283442

298637, 0.

298393

279342, 0.

283852

290157

0.

288562

289379

102

-0.

403

238086

Ithare Medical Clinic (10358)

0.

297215

294144, 0.

299505

291588, 0.

315358

279463

0.

304026

288398

0.

295696

287773, 0.

290793

28149, 0.

294299

288758

0.

293596

286007

103

0.

553

829177

Korakora Health Centre (13382)

0.

291213

284701, 0.

311348

300115, 0.

305398

292818

0.

302653

292545

0.

303343

287751, 0.

284562

285688, 0.

280839

278392

0.

289581

283944

104

2.

514

94006

Nimoli Medical Services

0.

291228

284044, 0.

298138

299954, 0.

293967

29775

0.

294444

293916

0.

29668

287685, 0.

292341

276744, 0.

281861

286844

0.

290294

283758

101

3.

43

4562

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

0.

28111

284925, 0.

293731

289745, 0.

28701

301087

0.

287284

291919

0.

295948

297978, 0.

288929

300757, 0.

293254

281225

0.

29271

29332

98

-0.

1461

479928

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

0.

467752

458838, 0.

453711

464859, 0.

466352

474938

0.

462605

466212

0.

287497

270774, 0.

279707

29056, 0.

285522

292726

0.

284242

284687

162

38.

75

9362

LOLA PMS (NG_DISC_PPMV_00019)

0.

454966

481136, 0.

45816

460797, 0.

545093

449282

0.

486073

463738

0.

290566

271585, 0.

279135

290923, 0.

284843

286936

0.

284848

283148

170

38.

643

9423

Clinique La Sentinelle (LT335)

0.

304852

295725, 0.

288982

301791, 0.

29119

281576

0.

295008

293031

0.

293149

294917, 0.

280753

277547, 0.

293316

265141

0.

289073

279202

102

4.

053

7193

CSI Lougguere

0.

298243

286502, 0.

307467

298096, 0.

290383

290171

0.

298698

29159

0.

292592

295101, 0.

296005

28756, 0.

291305

28473

0.

293301

28913

101

0.

84

843423

Nkouampoer (SU11009-17)

0.

288722

298429, 0.

284976

301234, 0.

303493

286918

0.

292397

295527

0.

29152

27295, 0.

289336

287852, 0.

306926

288115

0.

295927

282972

98

4.

807

24823

Overall Average

0.

325792

323108

0.

289665

286697

112

8.

671

5837

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] )/ fhirdhis2_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'] = 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)
results.append(case_result)
print(tabulate(results, headers='firstrow', tablefmt='pipe'))

...