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

Refactor to separate gaps and data requirements #293

Merged
merged 5 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/calculation/Calculator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import * as MeasureBundleHelpers from '../helpers/MeasureBundleHelpers';
import * as ResultsHelpers from './ClauseResultsBuilder';
import * as DataRequirementHelpers from '../helpers/DataRequirementHelpers';
import MeasureReportBuilder from './MeasureReportBuilder';
import * as GapsInCareHelpers from '../gaps/GapsReportBuilder';
import * as GapsReportBuilder from './GapsReportBuilder';
import { generateHTML, generateClauseCoverageHTML } from './HTMLBuilder';
import { parseQueryInfo } from '../gaps/QueryFilterParser';
import * as RetrievesHelper from '../gaps/RetrievesFinder';
import { parseQueryInfo } from '../helpers/elm/QueryFilterParser';
import * as RetrievesHelper from '../helpers/elm/RetrievesHelper';
import { GracefulError } from '../types/errors/GracefulError';
import {
ErrorWithDebugInfo,
Expand All @@ -40,7 +40,7 @@ import { pruneDetailedResults } from '../helpers/DetailedResultsHelpers';
import { clearElmInfoCache } from '../helpers/elm/ELMInfoCache';
import _, { omit } from 'lodash';
import { ELM } from '../types/ELMTypes';
import { getReportBuilder } from '../helpers/reportBuilderFactory';
import { getReportBuilder } from '../helpers/ReportBuilderFactory';

/**
* Calculate measure against a set of patients. Returning detailed results for each patient and population group.
Expand Down Expand Up @@ -536,7 +536,7 @@ export async function calculateGapsInCare<T extends OneOrMultiPatient>(
errorLog.push(...retrievesErrors);

// Add detailed info to queries based on clause results
const gapsRetrieves = GapsInCareHelpers.processQueriesForGaps(baseRetrieves, dr);
const gapsRetrieves = GapsReportBuilder.processQueriesForGaps(baseRetrieves, dr);

const grPromises = gapsRetrieves.map(async retrieve => {
// If the retrieves have a localId for the query and a known library name, we can get more info
Expand All @@ -558,19 +558,19 @@ export async function calculateGapsInCare<T extends OneOrMultiPatient>(
await Promise.all(grPromises);

const { results: detailedGapsRetrieves, withErrors: reasonDetailErrors } =
GapsInCareHelpers.calculateReasonDetail(gapsRetrieves, improvementNotation, dr);
GapsReportBuilder.calculateReasonDetail(gapsRetrieves, improvementNotation, dr);

errorLog.push(...reasonDetailErrors);

const { detectedIssues, withErrors: detectedIssueErrors } = GapsInCareHelpers.generateDetectedIssueResources(
const { detectedIssues, withErrors: detectedIssueErrors } = GapsReportBuilder.generateDetectedIssueResources(
detailedGapsRetrieves,
matchingMeasureReport,
improvementNotation
);
errorLog.push(...detectedIssueErrors);

const patient = res.patientObject?._json as fhir4.Patient;
const gapsBundle = GapsInCareHelpers.generateGapsInCareBundle(detectedIssues, matchingMeasureReport, patient);
const gapsBundle = GapsReportBuilder.generateGapsInCareBundle(detectedIssues, matchingMeasureReport, patient);
result.push(gapsBundle);
if (debugOutput && options.enableDebugOutput) {
debugOutput.gaps = {
Expand Down
2 changes: 1 addition & 1 deletion src/calculation/ClauseResultsBuilder.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as ClauseResultsHelpers from './ClauseResultsHelpers';
import * as ClauseResultsHelpers from '../helpers/ClauseResultsHelpers';
import * as MeasureBundleHelpers from '../helpers/MeasureBundleHelpers';
import * as ELMDependencyHelper from '../helpers/elm/ELMDependencyHelpers';
import { ELM, LibraryDependencyInfo } from '../types/ELMTypes';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ import {
ReasonDetailData
} from '../types/Calculator';
import { FinalResult, ImprovementNotation, CareGapReasonCode, CareGapReasonCodeDisplay } from '../types/Enums';
import {
flattenFilters,
generateDetailedCodeFilter,
generateDetailedDateFilter,
generateDetailedValueFilter
} from '../helpers/DataRequirementHelpers';
import {
EqualsFilter,
InFilter,
Expand All @@ -26,6 +20,12 @@ import {
} from '../types/QueryFilterTypes';
import { GracefulError, isOfTypeGracefulError } from '../types/errors/GracefulError';
import { compareValues } from '../helpers/ValueComparisonHelpers';
import {
flattenFilters,
generateDetailedCodeFilter,
generateDetailedDateFilter,
generateDetailedValueFilter
} from '../helpers/elm/QueryFilterParser';

/**
* Iterate through base queries and add clause results for parent query and retrieve
Expand Down Expand Up @@ -249,7 +249,7 @@ export function generateGuidanceResponses(
codeFilter: [{ ...dataTypeCodeFilter }]
};

addFiltersToDataRequirement(q, dataRequirement, withErrors);
addGapFiltersToDataRequirement(q, dataRequirement, withErrors);

const guidanceResponse: fhir4.GuidanceResponse = {
resourceType: 'GuidanceResponse',
Expand Down Expand Up @@ -608,8 +608,8 @@ function getGapReasonCode(filter: AnyFilter): CareGapReasonCode | GracefulError
* @param withErrors Errors object which will eventually be returned to the user if populated
* @returns void, but populated the dataRequirement filters
*/
export function addFiltersToDataRequirement(
q: GapsDataTypeQuery | DataTypeQuery,
export function addGapFiltersToDataRequirement(
q: GapsDataTypeQuery,
dataRequirement: fhir4.DataRequirement,
withErrors: GracefulError[]
) {
Expand Down
248 changes: 74 additions & 174 deletions src/helpers/DataRequirementHelpers.ts
Original file line number Diff line number Diff line change
@@ -1,52 +1,27 @@
import { Extension } from 'fhir/r4';
import { CalculationOptions, DataTypeQuery, DRCalculationOutput } from '../types/Calculator';
import { GracefulError } from '../types/errors/GracefulError';
import {
EqualsFilter,
InFilter,
DuringFilter,
AndFilter,
AnyFilter,
Filter,
NotNullFilter,
codeFilterQuery,
ValueFilter,
IsNullFilter
} from '../types/QueryFilterTypes';
import { EqualsFilter, InFilter, DuringFilter, codeFilterQuery, AttributeFilter } from '../types/QueryFilterTypes';
import { PatientParameters } from '../compartment-definition/PatientParameters';
import { SearchParameters } from '../compartment-definition/SearchParameters';
import { ELM, ELMIdentifier } from '../types/ELMTypes';
import { ExtractedLibrary } from '../types/CQLTypes';
import * as Execution from '../execution/Execution';
import { UnexpectedResource } from '../types/errors/CustomErrors';
import * as GapsInCareHelpers from '../gaps/GapsReportBuilder';
import { parseQueryInfo } from '../gaps/QueryFilterParser';
import * as RetrievesHelper from '../gaps/RetrievesFinder';
import {
flattenFilters,
generateDetailedCodeFilter,
generateDetailedDateFilter,
generateDetailedValueFilter,
parseQueryInfo
} from './elm/QueryFilterParser';
import * as RetrievesHelper from './elm/RetrievesHelper';
import { uniqBy } from 'lodash';
import { DateTime, Interval } from 'cql-execution';
import { parseTimeStringAsUTC } from '../execution/ValueSetHelper';
import * as MeasureBundleHelpers from './MeasureBundleHelpers';
const FHIR_QUERY_PATTERN_URL = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-fhirQueryPattern';

/**
* Take any nesting of base filters and AND filters and flatten into one list
*
* @param filter the root filter to flatten
* @returns a list of all filters used by this query at one level
*/
export function flattenFilters(filter: AnyFilter): AnyFilter[] {
if (filter.type !== 'and') {
return [filter];
} else {
const a: AnyFilter[] = [];
(filter as AndFilter).children.forEach(c => {
a.push(...flattenFilters(c));
});

return a;
}
}

/**
* Returns a FHIR library containing data requirements, given a root library
*/
Expand Down Expand Up @@ -101,10 +76,10 @@
type: { coding: [{ code: 'module-definition', system: 'http://terminology.hl7.org/CodeSystem/library-type' }] },
status: 'unknown'
};
results.dataRequirement = uniqBy(
allRetrieves.map(retrieve => {
const dr = generateDataRequirement(retrieve);
GapsInCareHelpers.addFiltersToDataRequirement(retrieve, dr, withErrors);
addFiltersToDataRequirement(retrieve, dr, withErrors);

Check warning on line 82 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
addFhirQueryPatternToDataRequirements(dr);
return dr;
}),
Expand All @@ -124,109 +99,6 @@
};
}

/**
* Map an EqualsFilter or InFilter into a FHIR DataRequirement codeFilter
*
* @param filter the filter to translate
* @returns codeFilter to be put on the DataRequirement
*/
export function generateDetailedCodeFilter(
filter: EqualsFilter | InFilter,
dataType?: string
): fhir4.DataRequirementCodeFilter | null {
const system: string | null = dataType ? codeLookup(dataType, filter.attribute) : null;
if (filter.type === 'equals') {
const equalsFilter = filter as EqualsFilter;
if (typeof equalsFilter.value === 'string') {
return {
path: equalsFilter.attribute,
code: [
{
code: equalsFilter.value,
...(system && { system: system })
}
]
};
}
} else if (filter.type === 'in') {
const inFilter = filter as InFilter;

if (inFilter.valueList?.every(v => typeof v === 'string')) {
return {
path: inFilter.attribute,
code: inFilter.valueList.map(v => ({
code: v as string,
...(system && { system: system })
}))
};
} else if (filter.valueCodingList) {
return {
path: filter.attribute,
code: filter.valueCodingList
};
}
}

return null;
}

/**
* Map a during filter into a FHIR DataRequirement dateFilter
*
* @param filter the "during" filter to map
* @returns dateFilter for the dateFilter list of dataRequirement
*/
export function generateDetailedDateFilter(filter: DuringFilter): fhir4.DataRequirementDateFilter {
return {
path: filter.attribute,
valuePeriod: { start: filter.valuePeriod.start, end: filter.valuePeriod.end }
};
}

/**
* Map a filter into a FHIR DataRequirement valueFilter extension
*
* @param filter the filter to map
* @returns extension for the valueFilter list of dataRequirement
*/
export function generateDetailedValueFilter(filter: Filter): fhir4.Extension | GracefulError {
if (filter.type === 'notnull' || filter.type === 'isnull') {
const nullFilter = filter as NotNullFilter | IsNullFilter;
return {
url: 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-valueFilter',
extension: [
{ url: 'path', valueString: nullFilter.attribute },
{ url: 'comparator', valueCode: 'eq' },
{ url: 'value', valueString: nullFilter.type === 'notnull' ? 'not null' : 'null' }
]
};
} else if (filter.type === 'value') {
const valueFilter = filter as ValueFilter;
const valueExtension = {
url: 'value',
valueBoolean: valueFilter.valueBoolean,
valueInteger: valueFilter.valueInteger,
valueString: valueFilter.valueString,
valueQuantity: valueFilter.valueQuantity,
valueRange: valueFilter.valueRange,
valueRatio: valueFilter.valueRatio
};
return {
url: 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-valueFilter',
extension: [
{ url: 'path', valueString: valueFilter.attribute },
{ url: 'comparator', valueCode: valueFilter.comparator },
// Remove undefineds
JSON.parse(JSON.stringify(valueExtension))
]
};
} else if (filter?.withError) {
return filter.withError;
} else {
return { message: `Detailed value filter is not yet supported for filter type ${filter.type}` } as GracefulError;
}
}

/**
* Creates query string for the data requirement using either the code filter code or valueSet and
* the specified endpoint, and adds a fhirQueryPattern extension to the data requirement that
Expand Down Expand Up @@ -358,42 +230,6 @@
return dataRequirement;
}

/**
* Given a fhir dataType as a string and an attribute as a string, returns the url which outlines
* the code system used to define the valid inputs for the given attribute for the given dataType
* @param dataType
* @param attribute
* @returns string url for code system
*/
export function codeLookup(dataType: string, attribute: string): string | null {
const validDataTypes: string[] = ['Observation', 'Procedure', 'Encounter', 'MedicationRequest'];

if (!validDataTypes.includes(dataType)) {
return null;
} else if (dataType === 'Observation' && attribute === 'status') {
return 'http://hl7.org/fhir/observation-status';
} else if (dataType === 'Procedure' && attribute === 'status') {
return 'http://hl7.org/fhir/event-status';
} else if (dataType === 'Encounter' && attribute === 'status') {
return 'http://hl7.org/fhir/encounter-status';
} else if (dataType === 'MedicationRequest') {
switch (attribute) {
case 'status':
return 'http://hl7.org/fhir/CodeSystem/medicationrequest-status';

case 'intent':
return 'http://hl7.org/fhir/CodeSystem/medicationrequest-intent';

case 'priority':
return 'http://hl7.org/fhir/request-priority';

default:
return null;
}
}
return null;
}

/**
* Extracts the measurement period information from either the options or effective period (in that order depending on presence)
* and populates a parameters object including the extracted info to be passed into the parseQueryInfo function
Expand Down Expand Up @@ -511,3 +347,67 @@
// unique the relatedArtifacts
return uniqBy(relatedArtifacts, JSON.stringify);
}

/**
*
* @param q The query which contains the filters to add to the data requirement
* @param dataRequirement Data requirement to add date filters to
* @param withErrors Errors object which will eventually be returned to the user if populated
* @returns void, but populated the dataRequirement filters
*/
export function addFiltersToDataRequirement(
elsaperelli marked this conversation as resolved.
Show resolved Hide resolved
q: DataTypeQuery,
dataRequirement: fhir4.DataRequirement,
withErrors: GracefulError[]
) {
if (q.queryInfo) {
const relevantSource = q.queryInfo.sources.find(source => source.resourceType === q.dataType);

Check warning on line 364 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 364 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
// if a source cannot be found that matches, exit the function
if (relevantSource) {
const detailedFilters = flattenFilters(q.queryInfo.filter);

Check warning on line 367 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

detailedFilters.forEach(df => {
// DuringFilter, etc. inherit from attribute filter (and have alias on them)
if (relevantSource.alias === (df as AttributeFilter).alias) {
if (df.type === 'equals' || df.type === 'in') {

Check warning on line 372 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch

Check warning on line 372 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
const cf = generateDetailedCodeFilter(df as EqualsFilter | InFilter, q.dataType);

Check warning on line 373 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

if (cf !== null) {
if (dataRequirement.codeFilter) {
dataRequirement.codeFilter.push(cf);

Check warning on line 377 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
} else {
dataRequirement.codeFilter = [cf];

Check warning on line 379 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
}

Check warning on line 380 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 380 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch

Check warning on line 380 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
}

Check warning on line 381 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 381 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
} else if (df.type === 'during') {
const dateFilter = generateDetailedDateFilter(df as DuringFilter);

Check warning on line 383 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
if (dataRequirement.dateFilter) {
dataRequirement.dateFilter.push(dateFilter);

Check warning on line 385 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
} else {
dataRequirement.dateFilter = [dateFilter];

Check warning on line 387 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
}

Check warning on line 388 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 388 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch

Check warning on line 388 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
} else {
const valueFilter = generateDetailedValueFilter(df);

Check warning on line 390 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
if (didEncounterDetailedValueFilterErrors(valueFilter)) {
withErrors.push(valueFilter);

Check warning on line 392 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
} else if (valueFilter) {
if (dataRequirement.extension) {
dataRequirement.extension.push(valueFilter);

Check warning on line 395 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
} else {
dataRequirement.extension = [valueFilter];

Check warning on line 397 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
}

Check warning on line 398 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 398 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch

Check warning on line 398 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
}

Check warning on line 399 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 399 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 399 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch

Check warning on line 399 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch

Check warning on line 399 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
}

Check warning on line 400 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 400 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 400 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch

Check warning on line 400 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch

Check warning on line 400 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch

Check warning on line 400 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
}

Check warning on line 401 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 401 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
});

Check warning on line 402 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
}

Check warning on line 403 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 403 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
}

Check warning on line 404 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 404 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
}

function didEncounterDetailedValueFilterErrors(tbd: fhir4.Extension | GracefulError): tbd is GracefulError {
if ((tbd as GracefulError).message) {
return true;

Check warning on line 409 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
} else {
return false;

Check warning on line 411 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
}

Check warning on line 412 in src/helpers/DataRequirementHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
}
Loading
Loading