Coder Social home page Coder Social logo

ucsf-ighs / openmrs-esm-ohri Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 38.0 12.22 MB

ESM module for OHRI built on top of the OpenMRS Framework

License: MIT License

TypeScript 88.55% JavaScript 2.39% SCSS 8.32% Shell 0.55% Dockerfile 0.20%
covid-19 javascript jest react typescript webpack

openmrs-esm-ohri's People

Contributors

alaboso avatar arodidev avatar art-ndiema avatar cynthiakamau avatar dependabot[bot] avatar ebambo avatar eudson avatar florianrappl avatar hadijahkyampeire avatar herbertug avatar herobiam avatar ibacher avatar kajambiya avatar kirwea avatar larslemos avatar lucyjemutai avatar manuelroemer avatar nravilla avatar odora0 avatar pirupius avatar prapakaransp avatar samuelmale avatar smallgod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

openmrs-esm-ohri's Issues

PULL_REQUEST_TEMPLATE

While Issuing a PR, as a Team to ensure proper documentation and best practices. Follow the below Check List
What is the Scope of the PR

Did you?

  • Breaking change (fix or feature that would cause existing functionality to change)
  • I have updated the documentation accordingly
  • I have added tests to cover my changes

Collaboration

  • Assign 2+ colleagues to your PR
  • Ensure the CI Checks Pass before Merge
  • Follow up with updating the Ticket associated to the Task

OHRI Technical Roadmap

Feature Work

  • Form Engine (Parity with Angular form engine)
    • Support rendering type "drug"
    • Ability to mark a form field as transient.
    • Support injecting of external data sources.
    • Support registration of custom expressions.
    • Support for creation of reusable components.
    • Support for rendering problem by concept class.
    • Support for file attachment rendering.
    • Concept location support.
    • Adjust the rest-web-services module to allow filtering of voided forms.
    • Form submission should use the form_uuid and encounter_uuid fetched from the backend.
    • Support for Z function as part of inbuilt Expression helpers.
    • Support translation/localisation (i18n) in labels.
    • Support for Drug Orders.
  • Form Builder
    • Display of Audit information on the form editor.
    • Support for referencing reusable components.
  • Mamba ETL
    • Move MambaETL DB flattening Task scheduler to base module.
    • Support for flattening concepts rendered as both questions and answers.
    • A configurable toggle between storing ETL output in the OpenMRS database or in External database.
    • Ensure that reports data is available while ETL is running.
    • Incremental update of ETL based on underlying data changes.
    • Automate addition of Make Scripts in MambaETL.
    • Service/API layer data pagination support in MambaETL.
    • Automate column naming in the ETL flattened Tables.
    • ObsGroups support for MambaETL.
    • Publish Version 2.0 of MambaETL.

Bugs

  • Mamba ETL
    • Fix build failure when reports.json configuration file is missing.
    • Concepts with multi-select values (e.g. key population) failing to flatten.
  • Form Engine
    • Previous values are picked from old encounters.

House Keeping

  • Form Engine
    • Update Form Engine Documentation.
    • Comparison of validation in RFE against AFE.
  • Mamba ETL
    • Test report on MambaETL running on MySQL 8.
    • MambaETL documentation - v1.0.0.
    • Performance improvement during the flattening process.
    • Robust Error Handling in MambaETL.
    • Code cleanups and Refactors in MambaETL.

Patient Chart Sidenav with sub-menu

A Patient chart side nav from openmrs-org[LINK] has a linear hierarchy similar to the image below:

Screenshot 2021-08-06 at 08 28 20

However, with OHRI we introduced a sub-menu dropdown with HIV being a dropdown with items (HIV, care and treatment, PMTCT) as shown below:

Screenshot 2021-08-06 at 08 30 53

In an attempt to make the sub-menu dynamic we came up with this code snippets:

index.ts

extensions: [
      {
        id: 'hts-summary-dashboard',
        slot: 'patient-chart-dashboard-slot',
        load: getSyncLifecycle(createDashboardLink(dashboardMeta), options),
        meta: dashboardMeta,
        online: true,
        offline: true,
      },
....
]

dashboard.meta.tsx

export const createDashboardLink = db => {
  const DashboardLink: React.FC<{ basePath: string }> = ({ basePath }) => {
    return (
      <SideNavMenu title="HIV" className={styles.noMarker} defaultExpanded={true}>
        <SideNavMenuItem className={styles.currentNavItem} isActive href={`${basePath}/${db.name}`}>
          HTS{' '}
        </SideNavMenuItem>
        <SideNavMenuItem>Care and Treatment </SideNavMenuItem>
        <SideNavMenuItem> PMTCT </SideNavMenuItem>
      </SideNavMenu>
    );
  };
  return DashboardLink;
};

export const dashboardMeta = {
    name: 'hts-summary',
    slot: 'hts-summary-dashboard-slot',
    config: { columns: 1, type: 'grid' },
    title: 'HTS Sessions',
};

while this worked for a single submenu link at the time, it became an issue with the adding of hrefs dynamically by updating the files to this:

dashboard.meta.tsx

....
....
        <SideNavMenuItem className={styles.currentNavItem} isActive href={`${basePath}/${db.hts.name}`}>
          HTS{' '}
        </SideNavMenuItem><SideNavMenuItem href={`${basePath}/${db.careAndTreatment.name}`}>Care and Treatment </SideNavMenuItem>
....
....
export const dashboardMeta = {
  hts: {
    name: 'hts-summary',
    slot: 'hts-summary-dashboard-slot',
    config: { columns: 1, type: 'grid' },
    title: 'HTS Sessions',
  },
  careAndTreatment: {
    name: 'care-and-treatment',
    slot: 'care-and-treatment-dashboard-slot',
    config: { columns: 1, type: 'grid' },
    title: 'Service Enrollments',
  },
};

This would allow has constantly update the dashboardMeta to dynamically add actions to the menu but this wasn't the case. The links ended up overriding each other and in some cases duplicating.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.