onaio / fhir-web

A web based interface for administering FHIR based digital health solutions
https://ona.io/home/introducing-quest-fhir-native-case-management/
Other
16 stars 14 forks source link

[EUSM]: Add a close flags form #1426

Closed dubdabasoduba closed 2 months ago

dubdabasoduba commented 4 months ago

Issue Context?

Issue Implementation details?

Build a form with the following fields

Field name Required Field Type Field Options Field Hint
Service Point :white_check_mark: Text Field ReadOnly N/A
Product :x: Text Field ReadOnly N/A
Status :white_check_mark: Dropdown Active, Inactive Select Flag Status
Comments :white_check_mark: TextArea How was the flag resolved?

Generate the following resources when a flag is closed.

Issue Acceptance criteria?

FHIR resources to be used?

No response

Relevant Information

Proposed URL https://{{base_url}}/admin/close-flags/{{uuid}}

peterMuriuki commented 3 months ago

related: https://github.com/onaio/fhir-web/issues/1336 - need to fix this first

kahummer commented 3 months ago

Navigating a URL via a button is possible, but currently, it can't be done through layer events. I would like to understand how the component interactions are expected to work from Akuko's perspective.

alepietrobon commented 3 months ago

The "close flag" will not be a layer event, but a link from either a popup or a table next to the map.

see https://app.akuko.io/post/1ad8e5a3-941b-4b93-ba00-4551ed19bfc6 image

@kahummer can you confirm what your concern is? Am i missing something?

kahummer commented 3 months ago

It's clear now, I thought this was to be at layer level on the service point. It should be fine

peterMuriuki commented 3 months ago

@dubdabasoduba

o get the location we have to find the inventory through the Flag.subject https://github.com/onaio/fhir-resources/issues/3035 and then find the Location through the List.entry https://github.com/onaio/fhir-resources/issues/3016.

The group inventory does not directly link to the location or the list resource(we could follow list.subject to get location). How exactly we go from flag.subject to get the location is thus not clear

These are flags created for the service point. To get the location we have to find the inventory through the Flag.subject https://github.com/onaio/fhir-resources/issues/3035

Here as well.

Also: What payload resource will be used to capture the comments.

peterMuriuki commented 3 months ago

Get flag

Product related flag

TO GET THE PRODUCT

import {FhirServiceClass} from '@opensrp/react-utils';
import {groupResourceType} from '@opensrp/fhir-helpers';

{queryFn: () => {
  return new FhirServiceClass(fhirBaseUrl).read(<flag.subject.reference>)
}}

TO GET THE LOCATION

import {FhirServiceClass} from '@opensrp/react-utils';
import {groupResourceType, servicePointProfileInventoryListCoding} from '@opensrp/fhir-helpers';

{queryFn: () => {
  return new FhirServiceClass(fhirBaseUrl).list({item: <flag.subject.reference>, code: <servicePointProfileInventoryListCoding.system>|<servicePointProfileInventoryListCoding.code>})
}}

Location related flag

TO GET THE LOCATION

dubdabasoduba commented 2 weeks ago

https://web.unicef-mg-eusm-preview.smartregister.org/admin/close-flags/ @Mstjamush here is the URL to close flags