當前位置: 首頁>>代碼示例>>Java>>正文


Java TimeType類代碼示例

本文整理匯總了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));
 }
 
開發者ID:furore-fhir,項目名稱:fhirstarters,代碼行數:19,代碼來源:Example30_AddSomeExtensions.java

示例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);
   }
}
 
開發者ID:cqframework,項目名稱:qicore_model,代碼行數:12,代碼來源:qicoreobservationAdapter.java

示例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); 
}
 
開發者ID:jamesagnew,項目名稱:hapi-fhir,代碼行數:8,代碼來源:JsonParser.java

示例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); 
}
 
開發者ID:jamesagnew,項目名稱:hapi-fhir,代碼行數:10,代碼來源:JsonParser.java

示例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;
}
 
開發者ID:jamesagnew,項目名稱:hapi-fhir,代碼行數:15,代碼來源:XmlParser.java

示例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);
  }    
}
 
開發者ID:jamesagnew,項目名稱:hapi-fhir,代碼行數:13,代碼來源:XmlParser.java

示例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;
}
 
開發者ID:jamesagnew,項目名稱:hapi-fhir,代碼行數:5,代碼來源:JsonParser.java

示例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;
}
 
開發者ID:jamesagnew,項目名稱:hapi-fhir,代碼行數:52,代碼來源:QuestionnaireResponseValidator.java

示例9: getValueTimeType

import org.hl7.fhir.dstu3.model.TimeType; //導入依賴的package包/類
public TimeType getValueTimeType(); 
開發者ID:cqframework,項目名稱:qicore_model,代碼行數:2,代碼來源:Iqicoreobservation.java


注:本文中的org.hl7.fhir.dstu3.model.TimeType類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。