-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(feat) O3-4068 Add ability to preview clinical view configurations in… #10
Conversation
… the patient chart
Thanks @CynthiaKamau ] Looks Good. Were these translation changes manually committed, or were they automatically added by Git? |
They are added when i do commits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the suggested changes for the renderingError
and apply everywhere
@@ -56,10 +57,18 @@ const ContentPackagesEditorContent: React.FC<TranslationFnProps> = ({ t }) => { | |||
}, []); | |||
|
|||
const renderSchemaChanges = useCallback(() => { | |||
if (!stringifiedSchema) { | |||
showSnackbar({ | |||
title: t('errorRendering', 'Error rendering'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title: t('errorRendering', 'Error rendering'), | |
title: t('renderingError', 'Rendering Error'), |
if (existingSchema) { | ||
// If it exists, update the schema | ||
localStorage.setItem(`packageJSON_${schema.id}`, JSON.stringify(schema)); | ||
localStorage.setItem(schemaId, JSON.stringify(schema)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest you create a small function called updateSchema, you can use here and on line 174 and remove the comment on the line above. This is just for readability purposes, otherwise just remove the comment
@@ -180,6 +189,10 @@ const ContentPackagesEditorContent: React.FC<TranslationFnProps> = ({ t }) => { | |||
} | |||
}; | |||
|
|||
const handlePreviewPackage = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const handlePreviewPackage = () => { | |
const handlePreviewClinicalView= () => { |
@@ -180,6 +189,10 @@ const ContentPackagesEditorContent: React.FC<TranslationFnProps> = ({ t }) => { | |||
} | |||
}; | |||
|
|||
const handlePreviewPackage = () => { | |||
window.open(window.getOpenmrsSpaBase() + `patient/${patientUuid}/chart/Patient%20Summary`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not opening the entry point of the Clinical View?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The preview is on the patient chart, because there is no way to view the chart side nav from the builder, on the form engine its easier because the libraries main component can be easily exposed
src/config-schema.ts
Outdated
export const configSchema = { | ||
patientUuid: { | ||
_type: Type.String, | ||
_description: 'UUID for the stock item category', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stock item?
translations/am.json
Outdated
@@ -42,6 +42,7 @@ | |||
"errorCreatingTabColumns": "Error creating tab columns", | |||
"errorDeletingConfiguration": "Error deleting configuration", | |||
"errorFindingSlotName": "የቦታ ስም አገኘበት", | |||
"errorRendering": "Error rendering", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"errorRendering": "Error rendering", | |
"renderingError": "Rendering Error", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
… the patient chart
Requirements
For changes to apps
If applicable
Summary
Add ability to preview clinical view configurations in the patient chart
Screenshots
Screen.Recording.2024-10-09.at.14.49.36.mov
Related Issue
Other