Skip to content

Remove promises#70

Merged
rdingwell merged 30 commits intodevfrom
remove_promises
May 1, 2023
Merged

Remove promises#70
rdingwell merged 30 commits intodevfrom
remove_promises

Conversation

@rdingwell
Copy link
Copy Markdown
Contributor

Describe your changes

This PR removes most Promises from the application and replaces them with async/await functions. Included in the PR is bare minimum tests for the service classes.

Upon testing issues were found with the QuestionnaireResponse schema models. The cause was due to the circular nature of the previous definitions where QuestionnaireResponse_Item included and used QuestionnaireResponse_Answer which included and used QuestionnaireResponse_Item. To resolve the issues the schemas where modified to augment the QuestionnaireResponse_Answer schema in the QuestionnaireResponse_Item scheme file. There may be other schemas that need to be modified similarly.

mocha configuration was moved to the .mocharc.json file. Global mongo test server instantiation was added via mocha pre hooks that run before the test suites are run.

Issue ticket number and Jira link

Please include the Jira Ticket Number and Link for this issue/task.

Checklist before requesting a review

  • I have performed a self-review of my code
  • Ensure the target / base branch for any feature PR is set to dev not main (the only exception to this is releases from dev and hotfix branches)

Checklist for conducting a review

  • Review the code changes and make sure they all make sense and are necessary.
  • Pull the PR branch locally and test by running through workflow and making sure everything works as it is supposed to.

Workflow

Owner of the Pull Request will be responsible for merge after all requirements are met, including approval from at least one reviewer. Additional changes made after a review will dismiss any approvals and require re-review of the additional updates. Auto merging can be enabled below if additional changes are likely not to be needed. The bot will auto assign reviewers to your Pull Request for you.

@rdingwell rdingwell changed the base branch from main to dev April 10, 2023 20:31
kennyEung
kennyEung previously approved these changes Apr 17, 2023
Copy link
Copy Markdown
Contributor

@KeeyanGhoreshi KeeyanGhoreshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ReadMe should be updated to include any additional setup steps for running locally. As it is now, the setup process won't work until you add a username/password for the mongo DB in your environment.

Comment thread src/fhir/utilities.ts Outdated
…hronous versions. Adding npm glob package to streamline processing of resources to load from filesystem. Adding tests for populateDB and loadResource functions
KeeyanGhoreshi
KeeyanGhoreshi previously approved these changes Apr 21, 2023
Copy link
Copy Markdown
Contributor

@KeeyanGhoreshi KeeyanGhoreshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected, just one minor nitpick, still good for approval regardless.

Comment thread src/fhir/utilities.ts
@rdingwell rdingwell merged commit e5231a7 into dev May 1, 2023
@rdingwell rdingwell deleted the remove_promises branch May 1, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants