Project: Complete UI rewrite or radiology and toolkit as an open web application

Thank you, I will do that.

1 Like
{
    "version": "0.1",
    "name": "My App",
    "description": "My App is a Packaged App",
    "launch_path": "index.html",
    "icons": {
        "16": "img/icons/mortar-16.png",
        "48": "img/icons/mortar-48.png",
        "128": "img/icons/mortar-128.png"
    },
    "developer": {
        "name": "Me",
        "url": "http://me.com"
    },
    "default_locale": "en",
    "activities": {
        "openmrs": {
            "href": "*"
        }
    }
}

This is an example manifest.webapp present on the openmrs-module-owa’s readme.md, what I can observe from this is that we need to have an index.html file which the module uses as the "launch_path".

Maybe we can use frameworks like react (in which I have a lot of experience) to render the UI in this index.html file.

The skeleton of the web app can be created using this tutorial

Please, do let me know if I am thinking in the right direction.

You can use whatever framework you like for the OWA. The index.html can include JS files.

You just need to know what you’re doing enough to get the job done in 12 weeks. Choose something you are familiar with or you can learn quickly.

You don’t have to change any of the existing code… you will need to use the components that were written, and you will need to assemble the components. I like your Figma designs. It will be good to implement those using the existing web components.

You also don’t have to write it against the lh-toolkit underlying codebase. You need to use the FHIR server that is used as part of the web components. It can be the HAPI FHIR or any other FHIR server

I’ll set up the server, and create the owa under my name the ownership of which can be changed upon completion, or maybe you can create a repo and provide me access.

I’ll then move ahead and set up the CI and CD pipeline. The timeline of this would be to complete it by 2022-06-12T18:30:00Z

Does this plan sound good?

Is there a repo for my project already created or should I create on in my name? @sunbiz @judywawira

CI & CD is up, it will deploy in preview on MR on ui-rewrite branch and in production when pushed to the ui-rewrite branch.

What could be a good way to add lh-toolkit-webcomponents to the OWA? Should I just clone them and remove the .git folder and import packages from it?

@r0bby @sunbiz @judywawira

@rosekamallove no, you should not replicate the code. Just add them to the package.json, so that they can downloaded and used from npm.

When I am installing the package from the GitLab URL using yarn it is throwing errors, so I have added the missing properties from the package.json file

Please add comments, so that I can update it, once ready it can be merged. It is a blocker for me @sunbiz

The HAPI FHIR R4 test server doesn’t have radiology, what test server should I use?

LibreHealth Toolkit - Home has the following endpoints:

Please suggest another test server @sunbiz @judywawira

/radiologyxx is an internal API that’s coming from the lh-radiology module. You can assume that will still be available and non-FHIR based. You will likely have to write your own webcomponents for these API Resources. For other things, the FHIR ImagingStudy and its related FHIR resources is what you need to use.

I think this is better discussed here, rather in the MR:

The root package is not meant to be used as a whole. Separate components should be used @lh-toolkit/ and imported individually. I don’t think this change to the main repo is necessary. @rosekamallove , Can you tell me why you want to import the entire monorepo and not only the webcomponents that you need?

1 Like

The only reason for me to use the whole package was so that I can have a direct import from @lh-toolkit/package by installing it in a single npm i @lh-toolkit-webcomponents and not needing to install say 30 different packages. Which will also make the dependencies in package.json harder to manage.

Installing a single package should be an opt-in, and we should at least be able to install all the packages as one.

I think, I will for now write for ImagingStudy as it is present in HAPI FHIR, and for /radiologyxx I can work on later. It changes the GSoC proposal flow but I think it makes sense to complete bulk of the project and then come to radiology

But you will still have to import each component separately when using it on another component or web page, right? With the entire repo, you get demos, and a lot of non-essential files for distribution purposes.

If we publish it to NPM then we can ignore the non-package files in a .npmignore file, article. But I think , for now, installing packages separately is okay. I will install them separately.

This MR is for the UI Rewrite, and I will add the details tomorrow, but those details would be iterative and will update them regularly and by the end of the Re Write I will ad a Demo video.

Is there anything else that is required?

Yes, please create an issue and link the MR with that issue. If you have some designs for the UI, please add it to the issue.

1 Like