-
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
💊 Feat/1194 Drug Info Validation #1195
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
04f6811
Stub new Unit Test
demariadaniel fd023d3
First Field / Test Updates
demariadaniel 96ab12a
Stub Validator Function
demariadaniel ce2ab45
Updated imports (automated)
demariadaniel 66dfd74
Destructure Drug Fields
demariadaniel 967909e
Unit Test with first validation
demariadaniel bf2b93e
Success Case testing Immune / Hormone Therapy
demariadaniel b0ca023
Update tests for individual entities
demariadaniel 9c0f1d0
Refactor
demariadaniel d0c4470
Move to Therapies, working on Swagger (draft)
demariadaniel 5a32745
Consistent Names, Add Messages
demariadaniel 240c6de
Names + Early Return
demariadaniel abd61eb
Updated therapy tests
demariadaniel 336d9fb
Fix therapy type logic, remove test changes
demariadaniel 0540b6e
Remove Missing Drug Info (unused)
demariadaniel b0d95de
Unsaved change
demariadaniel 1dae2f3
Unsaved Error removed
demariadaniel f0c6295
Condensed validation
demariadaniel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,24 +17,24 @@ | |
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
import { DeepReadonly } from 'deep-freeze'; | ||
import { entities as dictionaryEntities } from '@overturebio-stack/lectern-client'; | ||
import { DeepReadonly } from 'deep-freeze'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Several alphabetized imports auto-updated |
||
import { | ||
BiomarkerFieldsEnum, | ||
ClinicalEntitySchemaNames, | ||
ClinicalTherapyType, | ||
CommonTherapyFieldsEnum, | ||
ComorbidityFieldsEnum, | ||
DonorFieldsEnum, | ||
SpecimenFieldsEnum, | ||
PrimaryDiagnosisFieldsEnum, | ||
ExposureFieldsEnum, | ||
FamilyHistoryFieldsEnum, | ||
FollowupFieldsEnum, | ||
TreatmentFieldsEnum, | ||
TherapyRxNormFields, | ||
CommonTherapyFields, | ||
ImmunotherapyFieldsEnum, | ||
PrimaryDiagnosisFieldsEnum, | ||
RadiationFieldsEnum, | ||
ClinicalTherapyType, | ||
ImmunotherapyFields, | ||
FamilyHistoryFieldsEnum, | ||
ExposureFieldsEnum, | ||
ComorbidityFieldsEnum, | ||
BiomarkerFieldsEnum, | ||
SpecimenFieldsEnum, | ||
TherapyRxNormFieldsEnum, | ||
TreatmentFieldsEnum, | ||
} from '../common-model/entities'; | ||
|
||
/** | ||
|
@@ -170,6 +170,7 @@ export enum DataValidationErrors { | |
INVALID_LOST_TO_FOLLOW_UP_ID = 'INVALID_LOST_TO_FOLLOW_UP_ID', | ||
INVALID_SUBMISSION_AFTER_LOST_TO_FOLLOW_UP = 'INVALID_SUBMISSION_AFTER_LOST_TO_FOLLOW_UP', | ||
INVALID_DIAGNOSIS_AFTER_LOST_TO_FOLLOW_UP = 'INVALID_DIAGNOSIS_AFTER_LOST_TO_FOLLOW_UP', | ||
INVALID_DRUG_INFO = 'INVALID_DRUG_INFO', | ||
} | ||
|
||
export type RegistrationStat = Array<{ | ||
|
@@ -406,19 +407,19 @@ export const ClinicalEntityToEnumFieldsMap: Record<ClinicalEntitySchemaNames, st | |
[ClinicalEntitySchemaNames.BIOMARKER]: Object.values(BiomarkerFieldsEnum), | ||
[ClinicalEntitySchemaNames.FOLLOW_UP]: Object.values(FollowupFieldsEnum), | ||
[ClinicalEntitySchemaNames.TREATMENT]: Object.values(TreatmentFieldsEnum), | ||
[ClinicalEntitySchemaNames.CHEMOTHERAPY]: (Object.values(TherapyRxNormFields) as string[]).concat( | ||
Object.values(CommonTherapyFields), | ||
), | ||
[ClinicalEntitySchemaNames.CHEMOTHERAPY]: (Object.values( | ||
TherapyRxNormFieldsEnum, | ||
) as string[]).concat(Object.values(CommonTherapyFieldsEnum)), | ||
[ClinicalEntitySchemaNames.RADIATION]: (Object.values(RadiationFieldsEnum) as string[]).concat( | ||
Object.values(CommonTherapyFields), | ||
Object.values(CommonTherapyFieldsEnum), | ||
), | ||
[ClinicalEntitySchemaNames.HORMONE_THERAPY]: (Object.values( | ||
TherapyRxNormFields, | ||
) as string[]).concat(Object.values(CommonTherapyFields)), | ||
[ClinicalEntitySchemaNames.IMMUNOTHERAPY]: (Object.values(TherapyRxNormFields) as string[]) | ||
.concat(Object.values(CommonTherapyFields)) | ||
.concat(Object.values(ImmunotherapyFields) as string[]), | ||
[ClinicalEntitySchemaNames.SURGERY]: Object.values(CommonTherapyFields) as string[], | ||
TherapyRxNormFieldsEnum, | ||
) as string[]).concat(Object.values(CommonTherapyFieldsEnum)), | ||
[ClinicalEntitySchemaNames.IMMUNOTHERAPY]: (Object.values(TherapyRxNormFieldsEnum) as string[]) | ||
.concat(Object.values(CommonTherapyFieldsEnum)) | ||
.concat(Object.values(ImmunotherapyFieldsEnum) as string[]), | ||
[ClinicalEntitySchemaNames.SURGERY]: Object.values(CommonTherapyFieldsEnum) as string[], | ||
}; | ||
|
||
export const TreatmentTypeValuesMappedByTherapy: Record<ClinicalTherapyType, string> = { | ||
|
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
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
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
Oops, something went wrong.
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.
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.
Standardize variable names