Skip to content

Commit e3b68e6

Browse files
Dtphelan1jafeltra
authored andcommitted
staging template uses patientId instead of MRN
1 parent ff76b0b commit e3b68e6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/extractors/CSVStagingExtractor.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ function formatTNMCategoryData(stagingData, patientId) {
3333
return formattedData;
3434
}
3535

36-
function formatStagingData(stagingData, categoryIds) {
36+
function formatStagingData(stagingData, categoryIds, patientId) {
3737
const {
38-
mrn, conditionId, type, stageGroup, stagingSystem, stagingCodeSystem, effectiveDate,
38+
conditionId, type, stageGroup, stagingSystem, stagingCodeSystem, effectiveDate,
3939
} = stagingData;
4040

4141
return {
42-
subjectId: mrn,
42+
subjectId: patientId,
4343
conditionId,
4444
type,
4545
stageGroup,
@@ -77,7 +77,7 @@ class CSVStagingExtractor extends BaseCSVExtractor {
7777
const mcodeCategoryResources = formattedCategoryData.map((d) => firstEntryInBundle(generateMcodeResources('TNMCategory', d)));
7878

7979
// Pass category resource ids to formatStagingData
80-
const formattedStagingData = formatStagingData(data, mcodeCategoryResources.map((r) => r.resource.id));
80+
const formattedStagingData = formatStagingData(data, mcodeCategoryResources.map((r) => r.resource.id), patientId);
8181
const stagingResource = firstEntryInBundle(generateMcodeResources('Staging', formattedStagingData));
8282

8383
// Push all resources into entryResources

0 commit comments

Comments
 (0)