generated from projecttacoma/node-fhir-server-ts-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Expose operation #106
Merged
Merged
Expose operation #106
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lmd59
reviewed
Aug 16, 2024
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.
Functionality looks pretty good! A couple of small change recommendations!
and streamline artifact comment create
elsaperelli
commented
Aug 21, 2024
lmd59
reviewed
Aug 21, 2024
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.
nice updates!
lmd59
approved these changes
Aug 21, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR exposes the $approve operation as an endpoint on the server. This functionality is defined in the CRMI IG here.
New behavior
The user can now approve a Measure or Library artifact and any resources it is composed of regardless of status by sending a GET or POST request to
Measure/$approve
,Measure/:id/$approve
,Library/$approve
andLibrary/:id/$approve
. This operation takes three optional parameters:approvalDate
,artifactAssessmentType
, andartifactAssessmentSummary
. IfartifactAssessmentType
andartifactAssessmentSummary
are both provided, then a cqf-artifactComment extension will be added to the artifact and any of its children. IfapprovalDate
is provided, theapprovalDate
is set, if not, it is set to the system. Thedate
is also set to the system date. Since this is only an operation supported in an Authoring Artifact Repository, theAUTHORING
environment variable must be set to true.Code changes
service/README.md
- add description of$approve
service/src/config/capabilityStatementResources.json
- add crmi-approveservice/src/config/serverConfig.ts
- addapprove
endpointsservice/src/db/dbOperations.ts
- addbatchUpdate
functionservice/src/requestSchemas
- add id and type and summary checks and ApproveArgs for type checkingservice/src/services/LibraryService.ts
/service/src/services/MeasureService.ts
- addapprove
functionservice/src/util/inputUtils.ts
- addvalueCode
togatherParams
service/test/services/LibraryService.test.ts
/service/test/services/MeasureService.test.ts
- added unit testsTesting guidance
npm run build:all
npm run check:all
service
, reset the database (npm run db:reset
) and test with the nested child artifact bundle I made and may connectathon bundles (attached example Insomnia requests are for use with the created nested artifact bundlenpm run start:all
date
andapprovalDate
are changed/added,extension
is added ifartifactAssessmentSummary
ANDartifactAssessmentType
are included as input parameters, etc.approve-testing.json