diff --git a/src/ICARECSVClient.js b/src/ICARECSVClient.js index de91417..b11dffe 100644 --- a/src/ICARECSVClient.js +++ b/src/ICARECSVClient.js @@ -1,10 +1,16 @@ const { BaseClient, + CSVAdverseEventExtractor, CSVCancerDiseaseStatusExtractor, + CSVCancerRelatedMedicationAdministrationExtractor, + CSVCancerRelatedMedicationRequestExtractor, + CSVClinicalTrialInformationExtractor, CSVConditionExtractor, CSVCTCAdverseEventExtractor, - CSVClinicalTrialInformationExtractor, + CSVObservationExtractor, CSVPatientExtractor, + CSVProcedureExtractor, + CSVStagingExtractor, CSVTreatmentPlanChangeExtractor, sortExtractors, } = require('mcode-extraction-framework'); @@ -14,11 +20,17 @@ class ICARECSVClient extends BaseClient { constructor({ extractors, commonExtractorArgs }) { super(); this.registerExtractors( + CSVAdverseEventExtractor, CSVCancerDiseaseStatusExtractor, - CSVConditionExtractor, + CSVCancerRelatedMedicationAdministrationExtractor, + CSVCancerRelatedMedicationRequestExtractor, CSVClinicalTrialInformationExtractor, + CSVConditionExtractor, CSVCTCAdverseEventExtractor, + CSVObservationExtractor, CSVPatientExtractor, + CSVProcedureExtractor, + CSVStagingExtractor, CSVTreatmentPlanChangeExtractor, ); // Store the extractors defined by the configuration file as local state @@ -28,10 +40,15 @@ class ICARECSVClient extends BaseClient { { type: 'CSVPatientExtractor', dependencies: [] }, { type: 'CSVConditionExtractor', dependencies: ['CSVPatientExtractor'] }, { type: 'CSVCancerDiseaseStatusExtractor', dependencies: ['CSVPatientExtractor'] }, - { type: 'CSVCTCAdverseEventExtractor', dependencies: ['CSVPatientExtractor'] }, { type: 'CSVClinicalTrialInformationExtractor', dependencies: ['CSVPatientExtractor'] }, { type: 'CSVTreatmentPlanChangeExtractor', dependencies: ['CSVPatientExtractor'] }, { type: 'CSVStagingExtractor', dependencies: ['CSVPatientExtractor'] }, + { type: 'CSVCancerRelatedMedicationAdministrationExtractor', dependencies: ['CSVPatientExtractor'] }, + { type: 'CSVCancerRelatedMedicationRequestExtractor', dependencies: ['CSVPatientExtractor'] }, + { type: 'CSVProcedureExtractor', dependencies: ['CSVPatientExtractor'] }, + { type: 'CSVObservationExtractor', dependencies: ['CSVPatientExtractor'] }, + { type: 'CSVAdverseEventExtractor', dependencies: ['CSVPatientExtractor'] }, + { type: 'CSVCTCAdverseEventExtractor', dependencies: ['CSVPatientExtractor'] }, ]; // Sort extractors based on order and dependencies this.extractorConfig = sortExtractors(this.extractorConfig, dependencyInfo); diff --git a/test/sample-client-data/adverse-event-information.csv b/test/sample-client-data/adverse-event-information.csv new file mode 100644 index 0000000..a2d07aa --- /dev/null +++ b/test/sample-client-data/adverse-event-information.csv @@ -0,0 +1,4 @@ +mrn,adverseEventId,adverseEventCode,adverseEventCodeSystem,adverseEventDisplayText,suspectedCauseId,suspectedCauseType,seriousness,seriousnessCodeSystem,seriousnessDisplayText,category,categoryCodeSystem,categoryDisplayText,severity,actuality,studyId,effectiveDate,recordedDate +123,adverseEventId-1,109006,code-system,Anxiety disorder of childhood OR adolescence,procedure-id,Procedure,serious,http://terminology.hl7.org/CodeSystem/adverse-event-seriousness,Serious,product-use-error|product-quality|wrong-rate,http://terminology.hl7.org/CodeSystem/adverse-event-category|http://snomed.info/sct|http://terminology.hl7.org/CodeSystem/adverse-event-category,Product Use Error|Product Quality|Wrong Rate,severe,actual,researchId-1,12-09-1994,12-09-1994 +456,adverseEventId-2,134006,http://snomed.info/sct,Decreased hair growth,medicationId-1,Medication,non-serious,http://terminology.hl7.org/CodeSystem/adverse-event-seriousness,Non-serious,product-quality|wrong-rate,http://terminology.hl7.org/CodeSystem/adverse-event-category|,Product Quality|,mild,potential,researchId-2,12-10-1995,12-10-1995 +789,adverseEventId-3,150003,,,,,,,,product-use-error,,,,,,12-09-1994, \ No newline at end of file diff --git a/test/sample-client-data/cancer-related-medication-administration-information.csv b/test/sample-client-data/cancer-related-medication-administration-information.csv new file mode 100644 index 0000000..125ed46 --- /dev/null +++ b/test/sample-client-data/cancer-related-medication-administration-information.csv @@ -0,0 +1,4 @@ +mrn,medicationId,code,codeSystem,displayText,startDate,endDate,treatmentReasonCode,treatmentReasonCodeSystem,treatmentReasonDisplayText,treatmentIntent,status +123,medicationId-1,10760,http://www.nlm.nih.gov/research/umls/rxnorm,Triamcinolone Oral Paste,2020-01-01,2020-07-05,999000,http://snomed.info/sct,Mixed islet cell and exocrine adenocarcinoma,373808002,on-hold +456,medicationId-2,91318,http://www.nlm.nih.gov/research/umls/rxnorm,Coal Tar Topical Solution,2020-02-17,2020-08-13,915007,http://snomed.info/sct,Malignant melanoma in junctional nevus,373808002,completed +789,medicationId-3,91833,http://www.nlm.nih.gov/research/umls/rxnorm,Vitamin K1 Injectable Solution [Aquamephyton],2020-01-12,2020-10-01,900006,http://snomed.info/sct,Mucin-producing adenocarcinoma,363676003,stopped \ No newline at end of file diff --git a/test/sample-client-data/cancer-related-medication-request-information.csv b/test/sample-client-data/cancer-related-medication-request-information.csv new file mode 100644 index 0000000..1561a49 --- /dev/null +++ b/test/sample-client-data/cancer-related-medication-request-information.csv @@ -0,0 +1,4 @@ +mrn,requestId,code,codeSystem,displayText,treatmentReasonCode,treatmentReasonCodeSystem,treatmentReasonDisplayText,procedureIntent,status,intent,authoredOn,requesterId +123,requestId-1,10760,http://www.nlm.nih.gov/research/umls/rxnorm,Triamcinolone Oral Paste,999000,http://snomed.info/sct,Mixed islet cell and exocrine adenocarcinoma,373808002,active,order,2020-01-01,requester-1 +456,requestId-2,91318,http://www.nlm.nih.gov/research/umls/rxnorm,Coal Tar Topical Solution,915007,http://snomed.info/sct,Malignant melanoma in junctional nevus,373808002,on-hold,proposal,2019-02-02,requester-2 +789,requestId-3,91833,http://www.nlm.nih.gov/research/umls/rxnorm,Vitamin K1 Injectable Solution [Aquamephyton],900006,http://snomed.info/sct,Mucin-producing adenocarcinoma,363676003,cancelled,plan,2021-06-12,requester-3 diff --git a/test/sample-client-data/observation-information.csv b/test/sample-client-data/observation-information.csv new file mode 100644 index 0000000..a11fdba --- /dev/null +++ b/test/sample-client-data/observation-information.csv @@ -0,0 +1,4 @@ +mrn,observationId,status,code,codeSystem,displayName,value,valueCodeSystem,effectiveDate,bodySite,laterality +123,observation-id-1,final,1695-6,http://loinc.org,,10828004,http://snomed.info/sct,2020-01-02,251007,66459002 +456,observation-id-2,final,8302-2,http://loinc.org,Body height,66.89 [in_i],,2020-01-02,251007,66459002 +789,observation-id-3,final,29463-7,http://loinc.org,Body Weight,185 [lb_av],,2020-01-02,251007,66459002 \ No newline at end of file diff --git a/test/sample-client-data/procedure-information.csv b/test/sample-client-data/procedure-information.csv new file mode 100644 index 0000000..d4924cb --- /dev/null +++ b/test/sample-client-data/procedure-information.csv @@ -0,0 +1,5 @@ +mrn,procedureId,conditionId,status,code,codeSystem,displayName,reasonCode,reasonCodeSystem,reasonDisplayName,effectiveDate,bodySite,laterality,treatmentIntent +123,procedure-id-1,condition-id-1,completed,152198000,http://snomed.info/sct,Brachytherapy (procedure),363346000,http://snomed.info/sct,Malignant tumor,2020-01-01,41224006,51440002,373808002 +456,procedure-id-2,condition-id-2,in-progress,174337000,http://snomed.info/sct,Destruction of lesion,363346000,http://snomed.info/sct,Malignant tumor,2020-01-12,41224006,51440002,373808002 +789,procedure-id-3,condition-id-3,completed,172043006,http://snomed.info/sct,Total mastectomy,363346000,http://snomed.info/sct,Malignant tumor,2020-06-30,41224006,51440002,373808002 +789,procedure-id-4,condition-id-3,in-progress,10611004,http://snomed.info/sct,Teleradiotherapy protons (procedure),363346000,http://snomed.info/sct,Malignant tumor,2020-01-12,41224006,51440002,373808002 \ No newline at end of file diff --git a/test/sample-client-data/staging-information.csv b/test/sample-client-data/staging-information.csv new file mode 100644 index 0000000..fe9bd0c --- /dev/null +++ b/test/sample-client-data/staging-information.csv @@ -0,0 +1,6 @@ +mrn,conditionId,stageGroup,t,n,m,type,stagingSystem,stagingCodeSystem,effectiveDate +123,conditionId-1,3C,cT3,cN3,cM0,Clinical,C146985,http://ncimeta.nci.nih.gov,2020-01-01 +456,conditionId-2,3C,cT3,cN3,cM0,Clinical,443830009,http://snomed.info/sct,2020-01-01 +789,conditionId-3,3C,,cN3,cM0,Clinical,444256004,http://snomed.info/sct,2020-01-02 +789,conditionId-3,3C,cT3,,cM0,Clinical,,,2020-01-03 +789,conditionId-3,3C,cT3,cN3,,Clinical,258235000,http://snomed.info/sct,2020-01-04 \ No newline at end of file