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://opensrp.io
Apache License 2.0
58 stars 59 forks source link

[Feature] Add ability to open web links/URLs in the default Android browser from a FHIR Questionnaire #3627

Open AnnieMungai opened 1 week ago

AnnieMungai commented 1 week ago

Background In Indonesia Kaders (CHWs), when conducting home visits, will navigate from the OpenSRP2 Job Aids app to URLs in the Android default browser from links in Questionnaires. This will allow the Kader to view additional information on the web.

User story I am Kader conducting a home visit. While I am conducting a via the Job Aids app, I want to get more information to help me provide additional counseling to the client. This information is on a video on a platform such as YouTube. I want to be able to navigate to YouTube videos from a URL on the app, that I can watch with the client, access the information, and get back to the Job Aids app and continue with the other segments of the home visit.

Required

Acceptance Criteria

Implementation Plan

pld commented 1 week ago

@f-odhiambo I've assigned this to you to add details on the implementation plan. Let us know if anything about the scope is not clear

FikriMilano commented 1 week ago

@f-odhiambo @pld here's a quick implementation that I did, kindly review https://github.com/google/android-fhir/pull/2732

https://github.com/user-attachments/assets/78aecf2d-d7ee-4136-8bf6-10930f18a5cc

FikriMilano commented 1 week ago

Here's what we need todo to the questionnaire item:

    {
      "linkId": "1",
      "text": "Normal text <a href=\"https://www.youtube.com/watch?v=sCnDfa-0FAg&t=1818s\">link text</a>",
      "type": "display"
    }
f-odhiambo commented 1 week ago

@pld I think this is done based on the above work by @FikriMilano low effort however we will need some clarity on whether the link is static or dynamic to complete the request for this ticket CC @AnnieMungai

AnnieMungai commented 1 week ago

@f-odhiambo - these will be static links.

@FikriMilano for the shared solution - if someone wants to get back to the app, what happens?

FikriMilano commented 1 week ago

@AnnieMungai tap the bottom-right button, as usual in Android

joyce-x-chen commented 1 week ago

Update: UNICEF had mentioned a web app on the last call, but upon further discussion (great job probing further @AnnieMungai), they clarified that there are 2 apps in use.

The checklist they wanted us to link to is ASIK, so we agreed that we will NOT integrate with ASIK and the job aids app will only prompt the kader to complete the checklist. No linking or integration required.

AnnieMungai commented 1 week ago

@update - I have amended the original ticket to remain within scope and meet client requirements after discussions on 22nd Nov. We are only required to have links on questionnaires that open web apps like Youtube.

FikriMilano commented 1 week ago

Wow, good job in preventing that from spiraling out of scope :D @joyce-x-chen @AnnieMungai