Search in sources :

Example 1 with NumberValue

use of org.hl7.fhir.utilities.graphql.NumberValue in project org.hl7.fhir.core by hapifhir.

the class GraphQLEngine method processPrimitive.

private void processPrimitive(Argument arg, Base value) {
    String s = value.fhirType();
    if (s.equals("integer") || s.equals("decimal") || s.equals("unsignedInt") || s.equals("positiveInt"))
        arg.addValue(new NumberValue(value.primitiveValue()));
    else if (s.equals("boolean"))
        arg.addValue(new NameValue(value.primitiveValue()));
    else
        arg.addValue(new StringValue(value.primitiveValue()));
}
Also used : NameValue(org.hl7.fhir.utilities.graphql.NameValue) NumberValue(org.hl7.fhir.utilities.graphql.NumberValue) StringValue(org.hl7.fhir.utilities.graphql.StringValue)

Example 2 with NumberValue

use of org.hl7.fhir.utilities.graphql.NumberValue in project org.hl7.fhir.core by hapifhir.

the class GraphQLEngine method processPrimitive.

private void processPrimitive(Argument arg, Base value) {
    String s = value.fhirType();
    if (s.equals("integer") || s.equals("decimal") || s.equals("unsignedInt") || s.equals("positiveInt"))
        arg.addValue(new NumberValue(value.primitiveValue()));
    else if (s.equals("boolean"))
        arg.addValue(new NameValue(value.primitiveValue()));
    else
        arg.addValue(new StringValue(value.primitiveValue()));
}
Also used : NameValue(org.hl7.fhir.utilities.graphql.NameValue) NumberValue(org.hl7.fhir.utilities.graphql.NumberValue) StringValue(org.hl7.fhir.utilities.graphql.StringValue)

Aggregations

NameValue (org.hl7.fhir.utilities.graphql.NameValue)2 NumberValue (org.hl7.fhir.utilities.graphql.NumberValue)2 StringValue (org.hl7.fhir.utilities.graphql.StringValue)2