Uploaded image for project: 'App Framework'
  1. App Framework
  2. AF-59

Extensions definitions to support a "requiredPrograms" property

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Should
    • Resolution: Won't Fix
    • None
    • 2.14.0
    • Medium

    Description

      1. Description

      When defining an extension, you should be able to specify a required program workflow's PatientState. Extensions would then be enabled/disabled based on the program workflow states of the patient.
      Eg.:

      {
        "id": "referenceapplication.realTime.simpleAdmission",
        "extensionPointId": "patientDashboard.visitActions",
        "type": "link",
        "label": "referenceapplication.task.simpleAdmission.label",
        "url": "htmlformentryui/htmlform/enterHtmlFormWithStandardUi.page?patientId={{patient.uuid}}&visitId={{visit.uuid}}&definitionUiResource=referenceapplication:htmlforms/simpleAdmission.xml",
        "icon": "icon-signin",
        "order": 50,
        "requiredPrivilege": "Task: referenceapplication.simpleAdmission",
        "require": "visit.active && !visit.admitted",
        "requiredPrograms": [
          {
            "program": "CIEL:1234",
            "workflow": "52ff1d71-c230-492c-b383-d04b9232af8f",
            "state": "PATIENT_ADMITTED"
          },
          {
            "program": "TB_TREATMENT"
          },
          ...
        ]
      }
      

      The above extension would be enabled only if the patient

      • Is enrolled in the program "CIEL:1234" and
      • Is in the program's "52ff1d71-c230-492c-b383-d04b9232af8f" workflow and
      • Is in the workflow's "PATIENT_ADMITTED" state.

      Or if the patient is enrolled in the program "TB_TREATMENT".

      In the above example we assume that "CIEL:1234", "TB_TREATMENT", "52ff1d71-c230-492c-b383-d04b9232af8f" and "PATIENT_ADMITTED" are valid references to Program, Program, ProgramWorkflow and ProgramWorkflowState entities.

      What is used on the RHS of either of "program", "workflow" or "state" fields is any valid reference to the entity that it aims at pointing to, including a reference to their defining concepts.
      Those references can be combined with each other in any way. As long as a unique arrangement can be matched to the patient's {{PatientProgram}}s, then the extension will be enabled.

      2. Acceptance criteria

      [TBC]

      Gliffy Diagrams

        Attachments

          Activity

            People

              samuel34 Samuel Male
              mksd Dimitri R
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: