Skip to content
This repository was archived by the owner on Apr 4, 2022. It is now read-only.
This repository was archived by the owner on Apr 4, 2022. It is now read-only.

valueFhirPath should not default to "value" in case its empty within the Mapping #19

Description

@geloro94

In:
src/main/java/de/numcodex/sq2cql/model/Mapping.java
@JsonCreator
public static Mapping of(@JsonProperty("key") TermCode key,
@JsonProperty("fhirResourceType") String resourceType,
@JsonProperty("valueFhirPath") String valueFhirPath,
@JsonProperty("fixedCriteria") Modifier... fixedCriteria) {
return new Mapping(Objects.requireNonNull(key), Objects.requireNonNull(resourceType), valueFhirPath,
return new Mapping(requireNonNull(key), requireNonNull(resourceType),
valueFhirPath == null ? "value" : valueFhirPath,

We should not default to "value". If no valueFhirPath is given the default is not value. This could prevent us from failing fast. Once the mapping is fixed, this should be refactored.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions