Skip to content
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

Adding Period to ResearchSubjects in CSVClinicalTrialInformationExtractor #197

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

dmendelowitz
Copy link
Contributor

Summary

This PR adds the period field to the ResearchSubject generated by the CSVClinicalTrialInformationExtractor in the form of new optional startDate and endDate fields in the CSV template. Adding either or both fields to the CSV should result in a period in the output.

Additionally, this PR fixes period in the CSVEncounterExtractor. Accidentally made it so period would only show up if both start and end were present, but start and end are optional for periods, so you don't actually need both. This should work correctly now with just start or end

Testing guidance

  • Run the extractor and see that ResearchSubject resources in the output now have proper period fields
  • Ensure that tests still pass and extraction still works as expected otherwise

@@ -1,11 +1,11 @@
const { ifAllArgsObj } = require('../helpers/templateUtils');
const { ifAllArgsObj, ifSomeArgsObj } = require('../helpers/templateUtils');
const { coding, reference } = require('./snippets');

function periodTemplate({ startDate, endDate }) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should get moved to the templateUtils helper, it's used here and in researchsubject template. It may be applicable elsewhere as well.

@rdingwell rdingwell merged commit c8902b9 into main Sep 28, 2023
8 checks passed
@rdingwell rdingwell deleted the research-subject-period branch September 28, 2023 18:52
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.

2 participants