App Framework: Passing parameter

currently, I’m working on SMART-on-FHIR and I want to register an app. I have followed the App Framework Docs.

[
  {
    "id": "smartapps.demoapp",
    "description": "First smart app",
    "order": 1,
    "extensions": [
      {
        "id": "smartapps.demoappHomepageLink",
        "extensionPointId": "smartAppManagement.apps",
        "type": "link",
        "label": "Demo App",
        "url": "ms/smartAppSelectorServlet?smartApp=http://127.0.0.1:9090/launch-standalone.html&patientId={{patient.uuid}}",
        "icon": "icon-hdd",
        "requiredPrivilege": "App: smartonfhir.demoappHomepageLink"
      }
    ]
  }
]

Everything is working fine but I’m not able to pass the PatientId to smartAppSelectorSevlet. I’m not sure but I think I’m missing something.

If you’re launching this from the context of a link on the home page, you don’t have a patient selected, right? So what value would you expect to populate in there (we can only populate a patient value from inside a patient context; for launching outside a patient context, we need to support not providing a patient—ideally, in that case, the SMART App will request a launch/patient scope so we can display the patient selector).

2 Likes

@ibacher thank you, now I understood. There is no need to pass PatientID.

1 Like