opensrp / fhircore

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
https://smartregister.org
Apache License 2.0
53 stars 41 forks source link

[Validation] Add validation to flag to the user if multiple Composition resource match a given identifier name #3057

Open f-odhiambo opened 6 months ago

f-odhiambo commented 6 months ago

Issue: Users may add (un-knowingly) multiple versions of the same configuration by adding multiple composition resources to HAPI instead of using the previously uploaded one and relying on versioning to track the changes made to the same resource. At the moment the app picks the top item in the array if this were to happen but it is not a sure way to know wether that is the most appropriate resource to use as the latest working version

Acceptance criteria

  1. Alert the user if multiple Composition resources match a given identifier

NB. May require user training to enforce the correct way of versioning of resources rather than adding multiple versions

dubdabasoduba commented 6 months ago

@qiarie This might be something we want to think about while scoping for versioning too.

qiarie commented 6 months ago

This is noted @dubdabasoduba

pld commented 6 months ago

I kind of don't think the client is the appropriate place to worry about this. Like if you're a user and you get this alert, most likely you won't know what it means.

Seems better to config/extend HAPI to only allow 1 composition (or whatever unit of app we use in the future, eg IG) per appID

dubdabasoduba commented 6 months ago

I kind of don't think the client is the appropriate place to worry about this. Like if you're a user and you get this alert, most likely you won't know what it means.

Seems better to config/extend HAPI to only allow 1 composition (or whatever unit of app we use in the future, eg IG) per appID

@pld I think we can extend the Gateway to return an error if it finds multiple compositions of type App Config for the same identifier

This we do not affect any other use of the Composition in the future