Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Next »

Finding Specific orgUnits / Location by Service

Searching orgunits / locations by following services

  • IUCD

  • Implant

  • STI

  • Sterilization

  • MA

  • MVA

  • Surgical Abortion

In FHIR, we are saving services under HealthcareService resource. And for this search we are performing reverse chaining from Location to HealthcareServices so it's more costly that any of the previous test.

More info on Reverse chaining here.

Summary of test results

DHIS2

FHIR

DHIS2 vs FHIR %

Average

0.280502

0.320258

89.1455

Test detailed results

logged on Nov 22/ 2022 UTC-7 21:44:00

Performance Testing for finding

Attempt

DHIS2 API (s)

FHIR API (s)

Improvement (%)

IUCD

Attempt - 1

0.325191

0.399285

81.4433

Attempt - 2

0.274983

0.3861

71.2207

Attempt - 3

0.278791

0.291635

95.5959

Implant

Attempt - 1

0.266742

0.379512

70.2855

Attempt - 2

0.281066

0.362733

77.4856

Attempt - 3

0.288277

0.372714

77.3454

STI

Attempt - 1

0.267304

0.367304

72.7746

Attempt - 2

0.276666

0.364429

75.9177

Attempt - 3

0.281687

0.383284

73.493

Sterillization

Attempt - 1

0.28283

0.282047

100.278

Attempt - 2

0.27741

0.283155

97.9711

Attempt - 3

0.27584

0.285375

96.6588

MA

Attempt - 1

0.269518

0.287611

93.7092

Attempt - 2

0.297901

0.275463

108.146

Attempt - 3

0.27518

0.283728

96.9873

MVA

Attempt - 1

0.28015

0.287905

97.3064

Attempt - 2

0.270377

0.274032

98.6662

Attempt - 3

0.273489

0.282751

96.7243

Surgical Abortion

Attempt - 1

0.27241

0.283562

96.0672

Attempt - 2

0.289893

0.29174

99.3669

Attempt - 3

0.284832

0.301047

94.6138

Overall Average

0.280502

0.320258

89.1455

Testing Script

results6 = [{"description": "Performance Testing for finding", "attempt": "Attempt", "dhis2": "DHIS2 API (s)", "fhir": "FHIR API (s)", "improvement": "Improvement (%)"}]
print("Case #6 - Measuring time taken to find outlet / location providing services")
services= ["IUCD", "Implant", "STI", "Sterillization", "MA", "MVA", "Surgical Abortion"]
improvements = []
dhis2_performances = []
fhir_performances = []
for service in services:
    for i in range(1,4):
        result6 = {}
        if i == 1:
            result6['description'] = "{}".format(service)
        result6['attempt'] = "Attempt - {}".format(i)
        dhis2_url = dhis2_base_url+'service={}'.format(service)
        result = requests.get(dhis2_url, auth=dhis2_auth)
        if result.status_code == 200:
            dhis2_performances.append(result.elapsed.total_seconds())
            result6['dhis2'] = dhis2_performances[-1]
            
        request_url = fhir_location_url+'_has:HealthcareService:location:name={}'.format(service)
        fhirResult = requests.get(request_url, auth=fhir_auth)
        if fhirResult.status_code == 200:
            fhir_performances.append(fhirResult.elapsed.total_seconds())
            result6['fhir'] = fhir_performances[-1]
        improvements.append((dhis2_performances[-1]/fhir_performances[-1])*100)
        result6['improvement'] = improvements[-1]
        results6.append(result6)
        time.sleep(0.01)

result6 = {}
result6['description'] = "Overall Average"
result6['dhis2'] = Average(dhis2_performances)
result6['fhir'] = Average(fhir_performances)
result6['improvement'] = Average(improvements)
results6.append(result6)
print(tabulate(results6, headers='firstrow', tablefmt='pipe'))

  • No labels