From 9d8e69b4c0e59d97a92627f4f0250f2a4f076b50 Mon Sep 17 00:00:00 2001 From: Dylan Mendelowitz Date: Fri, 15 Sep 2023 12:59:53 -0400 Subject: [PATCH] Adding Encounter Extractor --- package-lock.json | 20 +++++++++---------- src/ICARECSVClient.js | 3 +++ .../encounter-information.csv | 4 ++++ 3 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 test/sample-client-data/encounter-information.csv diff --git a/package-lock.json b/package-lock.json index f6690e3..b6b38d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1104,9 +1104,9 @@ "dev": true }, "@types/triple-beam": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.2.tgz", - "integrity": "sha512-txGIh+0eDFzKGC25zORnswy+br1Ha7hj5cMVwKIU7+s0U2AxxJru/jZSMU6OC9MJWP6+pc/hc6ZjyZShpsyY2g==" + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.3.tgz", + "integrity": "sha512-6tOUG+nVHn0cJbVp25JFayS5UE6+xlbcNF9Lo9mU7U0zk3zeUShZied4YEQZjy1JBF043FSkdXw8YkUJuVtB5g==" }, "@types/yargs": { "version": "15.0.15", @@ -5749,7 +5749,7 @@ } }, "mcode-extraction-framework": { - "version": "git+https://github.com/mcode/mcode-extraction-framework.git#b82ba0eee7d571c696a1c6dd6afb2b244ada9b20", + "version": "git+https://github.com/mcode/mcode-extraction-framework.git#9e9659494a15b19e64f3331e8c95513544e2f44a", "from": "git+https://github.com/mcode/mcode-extraction-framework.git", "requires": { "ajv": "^6.12.6", @@ -7750,9 +7750,9 @@ } }, "triple-beam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", - "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", + "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==" }, "tsconfig-paths": { "version": "3.14.1", @@ -8086,9 +8086,9 @@ } }, "winston": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.9.0.tgz", - "integrity": "sha512-jW51iW/X95BCW6MMtZWr2jKQBP4hV5bIDq9QrIjfDk6Q9QuxvTKEAlpUNAzP+HYHFFCeENhph16s0zEunu4uuQ==", + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.10.0.tgz", + "integrity": "sha512-nT6SIDaE9B7ZRO0u3UvdrimG0HkB7dSTAgInQnNR2SOPJ4bvq5q79+pXLftKmP52lJGW15+H5MCK0nM9D3KB/g==", "requires": { "@colors/colors": "1.5.0", "@dabh/diagnostics": "^2.0.2", diff --git a/src/ICARECSVClient.js b/src/ICARECSVClient.js index b11dffe..65a9939 100644 --- a/src/ICARECSVClient.js +++ b/src/ICARECSVClient.js @@ -7,6 +7,7 @@ const { CSVClinicalTrialInformationExtractor, CSVConditionExtractor, CSVCTCAdverseEventExtractor, + CSVEncounterExtractor, CSVObservationExtractor, CSVPatientExtractor, CSVProcedureExtractor, @@ -27,6 +28,7 @@ class ICARECSVClient extends BaseClient { CSVClinicalTrialInformationExtractor, CSVConditionExtractor, CSVCTCAdverseEventExtractor, + CSVEncounterExtractor, CSVObservationExtractor, CSVPatientExtractor, CSVProcedureExtractor, @@ -49,6 +51,7 @@ class ICARECSVClient extends BaseClient { { type: 'CSVObservationExtractor', dependencies: ['CSVPatientExtractor'] }, { type: 'CSVAdverseEventExtractor', dependencies: ['CSVPatientExtractor'] }, { type: 'CSVCTCAdverseEventExtractor', dependencies: ['CSVPatientExtractor'] }, + { type: 'CSVEncounterExtractor', dependencies: ['CSVPatientExtractor'] }, ]; // Sort extractors based on order and dependencies this.extractorConfig = sortExtractors(this.extractorConfig, dependencyInfo); diff --git a/test/sample-client-data/encounter-information.csv b/test/sample-client-data/encounter-information.csv new file mode 100644 index 0000000..eb108cb --- /dev/null +++ b/test/sample-client-data/encounter-information.csv @@ -0,0 +1,4 @@ +mrn,encounterId,status,classCode,classSystem,typeCode,typeSystem,startDate,endDate +123,encounterId-1,arrived,AMB,http://terminology.hl7.org/CodeSystem/v3-ActCode,11429006,http://snomed.info/sct,2020-01-10,2020-01-10 +456,encounterId-2,planned,AMB,http://terminology.hl7.org/CodeSystem/v3-ActCode,270427003,http://snomed.info/sct,2021-02-10,2021-05-12 +789,encounterId-3,cancelled,IMP,http://terminology.hl7.org/CodeSystem/v3-ActCode,,,, \ No newline at end of file