-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Conversation
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.
@baoqchau thanks for the PR! There are couple of adjustments that need to be made.
app/labs/edit/route.js
Outdated
|
||
actions: { | ||
returnToAllItems() { | ||
this.controller.send('returnToAllItems'); | ||
} | ||
}, | ||
|
||
getCustomFormData() { |
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.
Looks like this code isn't used, but you need this code for forms that are set to "Always Include". Custom forms that are set to this get added automatically on new items.
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.
So how should I fix this @jkleinsc ? You have any suggestion?
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.
Take a look at how visit does this:
https://github.com/HospitalRun/hospitalrun-frontend/blob/master/app/visits/edit/route.js#L35-L43
Basically what you need to do is to create a newData object and make sure it includes a custom forms object and then you return customForms.setDefaultCustomForms(['lab'], newData) from the getNewData function.
app/labs/edit/template.hbs
Outdated
@@ -42,6 +42,7 @@ | |||
{{#if canComplete}} | |||
{{em-input property="result" label=(t 'labels.result') class="test-result-input"}} | |||
{{/if}} | |||
{{custom-form-manager model=model formType="lab"}} |
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 move this down after notes
app/locales/en/translations.js
Outdated
@@ -175,7 +175,8 @@ export default { | |||
textarea: 'Large Text', | |||
visitFormType: 'Visit', | |||
opdReportFormType: 'Outpatient Report', | |||
dischargeReportFormType: 'Discharge Report' | |||
dischargeReportFormType: 'Discharge Report', | |||
labFormType: 'Lab Form Type' |
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.
Translated text should just be 'Lab', not 'Lab Form Type'
Looks good to me @baoqchau. Thanks for the PR! |
Fixes #65
Changes proposed in this pull request:
cc @HospitalRun/core-maintainers