use of org.hl7.fhir.r5.model.ParameterDefinition in project quality-measure-and-cohort-service by Alvearie.
the class R4ParameterDefinitionWithDefaultToCohortParameterConverterTest method testAttachment__shouldThrowException.
@Test(expected = UnsupportedFhirTypeException.class)
public void testAttachment__shouldThrowException() {
ParameterDefinition parameterDefinition = getBaseParameterDefinition("Attachment");
Attachment fhirValue = new Attachment();
parameterDefinition.addExtension(CDMConstants.PARAMETER_DEFAULT_URL, fhirValue);
R4ParameterDefinitionWithDefaultToCohortParameterConverter.toCohortParameter(parameterDefinition);
}
use of org.hl7.fhir.r5.model.ParameterDefinition in project quality-measure-and-cohort-service by Alvearie.
the class R4ParameterDefinitionWithDefaultToCohortParameterConverterTest method testTime__shouldReturnTimeParameter.
@Test
public void testTime__shouldReturnTimeParameter() {
ParameterDefinition parameterDefinition = getBaseParameterDefinition("time");
String timeString = "12:30:00";
TimeType fhirValue = new TimeType(timeString);
parameterDefinition.addExtension(CDMConstants.PARAMETER_DEFAULT_URL, fhirValue);
assertEquals(new TimeParameter(timeString), R4ParameterDefinitionWithDefaultToCohortParameterConverter.toCohortParameter(parameterDefinition));
}
use of org.hl7.fhir.r5.model.ParameterDefinition in project quality-measure-and-cohort-service by Alvearie.
the class R4ParameterDefinitionWithDefaultToCohortParameterConverterTest method testDate__shouldReturnDate.
@Test
public void testDate__shouldReturnDate() {
ParameterDefinition parameterDefinition = getBaseParameterDefinition("date");
String dateString = "2020-01-01";
DateType fhirValue = new DateType(dateString);
parameterDefinition.addExtension(CDMConstants.PARAMETER_DEFAULT_URL, fhirValue);
assertEquals(new DateParameter(dateString), R4ParameterDefinitionWithDefaultToCohortParameterConverter.toCohortParameter(parameterDefinition));
}
use of org.hl7.fhir.r5.model.ParameterDefinition in project quality-measure-and-cohort-service by Alvearie.
the class R4ParameterDefinitionWithDefaultToCohortParameterConverterTest method testAnnotation__shouldThrowException.
@Test(expected = UnsupportedFhirTypeException.class)
public void testAnnotation__shouldThrowException() {
ParameterDefinition parameterDefinition = getBaseParameterDefinition("Annotation");
Annotation fhirValue = new Annotation();
parameterDefinition.addExtension(CDMConstants.PARAMETER_DEFAULT_URL, fhirValue);
R4ParameterDefinitionWithDefaultToCohortParameterConverter.toCohortParameter(parameterDefinition);
}
use of org.hl7.fhir.r5.model.ParameterDefinition in project quality-measure-and-cohort-service by Alvearie.
the class R4ParameterDefinitionWithDefaultToCohortParameterConverterTest method testBoolean__shouldReturnBooleanParameter.
@Test
public void testBoolean__shouldReturnBooleanParameter() {
ParameterDefinition parameterDefinition = getBaseParameterDefinition("boolean");
BooleanType fhirValue = new BooleanType(true);
parameterDefinition.addExtension(CDMConstants.PARAMETER_DEFAULT_URL, fhirValue);
assertEquals(new BooleanParameter(true), R4ParameterDefinitionWithDefaultToCohortParameterConverter.toCohortParameter(parameterDefinition));
}
Aggregations