Skip to content
This repository has been 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

Open
geloro94 opened this issue Feb 1, 2022 · 0 comments
Assignees

Comments

@geloro94
Copy link
Collaborator

geloro94 commented Feb 1, 2022

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.

@geloro94 geloro94 self-assigned this Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant