本文整理匯總了Java中org.hl7.fhir.dstu3.model.TimeType類的典型用法代碼示例。如果您正苦於以下問題:Java TimeType類的具體用法?Java TimeType怎麽用?Java TimeType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
TimeType類屬於org.hl7.fhir.dstu3.model包,在下文中一共展示了TimeType類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: main
import org.hl7.fhir.dstu3.model.TimeType; //導入依賴的package包/類
public static void main(String[] theArgs) {
Patient pat = new Patient();
pat.addName().setFamily("Simpson").addGiven("Homer").addGiven("J");
// Add an extension on the resource
pat.addExtension()
.setUrl("http://hl7.org/fhir/StructureDefinition/patient-importance")
.setValue(new CodeableConcept().setText("Patient is a VIP"));
// Add an extension on a primitive
pat.getBirthDateElement().setValueAsString("1955-02-22");
pat.getBirthDateElement().addExtension()
.setUrl("http://hl7.org/fhir/StructureDefinition/patient-birthTime")
.setValue(new TimeType("23:30"));
IParser parser = FhirContext.forDstu3().newJsonParser().setPrettyPrint(true);
System.out.println(parser.encodeResourceToString(pat));
}
示例2: getValueTimeType
import org.hl7.fhir.dstu3.model.TimeType; //導入依賴的package包/類
public TimeType getValueTimeType()
{
try
{
return adaptedClass.getValueTimeType();
}
catch (Exception e)
{
throw new RuntimeException("Error getting ValueTimeType", e);
}
}
示例3: composeTimeCore
import org.hl7.fhir.dstu3.model.TimeType; //導入依賴的package包/類
protected void composeTimeCore(String name, TimeType value, boolean inArray) throws IOException {
if (value != null && value.hasValue()) {
prop(name, value.asStringValue());
}
else if (inArray)
writeNull(name);
}
示例4: composeTimeExtras
import org.hl7.fhir.dstu3.model.TimeType; //導入依賴的package包/類
protected void composeTimeExtras(String name, TimeType value, boolean inArray) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || makeComments(value))) {
open(inArray ? null : "_"+name);
composeElement(value);
close();
}
else if (inArray)
writeNull(name);
}
示例5: parseTime
import org.hl7.fhir.dstu3.model.TimeType; //導入依賴的package包/類
protected TimeType parseTime(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError {
TimeType res = new TimeType(xpp.getAttributeValue(null, "value"));
parseElementAttributes(xpp, res);
next(xpp);
int eventType = nextNoWhitespace(xpp);
while (eventType != XmlPullParser.END_TAG) {
if (!parseElementContent(eventType, xpp, res))
unknownContent(xpp);
eventType = nextNoWhitespace(xpp);
}
next(xpp);
parseElementClose(res);
return res;
}
示例6: composeTime
import org.hl7.fhir.dstu3.model.TimeType; //導入依賴的package包/類
protected void composeTime(String name, TimeType value) throws IOException {
if (value != null && (!Utilities.noString(value.getId()) || ExtensionHelper.hasExtensions(value) || !Utilities.noString(value.getValue()))) {// time
composeElementAttributes(value);
if (value.asStringValue() != null)
xml.attribute("value", value.asStringValue());
xml.enter(FHIR_NS, name);
composeElementElements(value);
composeElementClose(value);
xml.exit(FHIR_NS, name);
}
}
示例7: parseTime
import org.hl7.fhir.dstu3.model.TimeType; //導入依賴的package包/類
protected TimeType parseTime(String v) throws IOException, FHIRFormatError {
TimeType res = new TimeType(v);
return res;
}
示例8: determineAllowedAnswerTypes
import org.hl7.fhir.dstu3.model.TimeType; //導入依賴的package包/類
private Set<Class<? extends Type>> determineAllowedAnswerTypes(QuestionnaireItemType type) {
Set<Class<? extends Type>> allowedAnswerTypes;
switch (type) {
case ATTACHMENT:
allowedAnswerTypes = allowedTypes(Attachment.class);
break;
case BOOLEAN:
allowedAnswerTypes = allowedTypes(BooleanType.class);
break;
case CHOICE:
allowedAnswerTypes = allowedTypes(Coding.class);
break;
case DATE:
allowedAnswerTypes = allowedTypes(DateType.class);
break;
case DATETIME:
allowedAnswerTypes = allowedTypes(DateTimeType.class);
break;
case DECIMAL:
allowedAnswerTypes = allowedTypes(DecimalType.class);
break;
case INTEGER:
allowedAnswerTypes = allowedTypes(IntegerType.class);
break;
case OPENCHOICE:
allowedAnswerTypes = allowedTypes(Coding.class, StringType.class);
break;
case QUANTITY:
allowedAnswerTypes = allowedTypes(Quantity.class);
break;
case REFERENCE:
allowedAnswerTypes = allowedTypes(Reference.class);
break;
case STRING:
allowedAnswerTypes = allowedTypes(StringType.class);
break;
case TEXT:
allowedAnswerTypes = allowedTypes(StringType.class);
break;
case TIME:
allowedAnswerTypes = allowedTypes(TimeType.class);
break;
case URL:
allowedAnswerTypes = allowedTypes(UriType.class);
break;
case NULL:
default:
allowedAnswerTypes = Collections.emptySet();
}
return allowedAnswerTypes;
}
示例9: getValueTimeType
import org.hl7.fhir.dstu3.model.TimeType; //導入依賴的package包/類
public TimeType getValueTimeType();