Tabnine Logo
QuestionnaireResponse$QuestionnaireResponseItemComponent.addItem
Code IndexAdd Tabnine to your IDE (free)

How to use
addItem
method
in
org.hl7.fhir.r4.model.QuestionnaireResponse$QuestionnaireResponseItemComponent

Best Java code snippets using org.hl7.fhir.r4.model.QuestionnaireResponse$QuestionnaireResponseItemComponent.addItem (Showing top 16 results out of 315)

origin: jamesagnew/hapi-fhir

/**
 * @return The first repetition of repeating field {@link #item}, creating it if it does not already exist
 */
public QuestionnaireResponseItemComponent getItemFirstRep() { 
 if (getItem().isEmpty()) {
  addItem();
 }
 return getItem().get(0);
}
origin: jamesagnew/hapi-fhir

@Override
public Base addChild(String name) throws FHIRException {
 if (name.equals("linkId")) {
  throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.linkId");
 }
 else if (name.equals("definition")) {
  throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.definition");
 }
 else if (name.equals("text")) {
  throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.text");
 }
 else if (name.equals("answer")) {
  return addAnswer();
 }
 else if (name.equals("item")) {
  return addItem();
 }
 else
  return super.addChild(name);
}
origin: jamesagnew/hapi-fhir

private void processExisting(String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> nResponse) throws FHIRException {
 // processing existing data
 for (QuestionnaireResponse.QuestionnaireResponseItemComponent ag : answerGroups) {
  List<Base> children = ((Element) ag.getUserData("object")).listChildrenByName(tail(path));
  for (Base child : children) {
   if (child != null) {
    QuestionnaireResponse.QuestionnaireResponseItemComponent ans = ag.addItem();
    ans.setUserData("object", child);
    nResponse.add(ans);
   }
  }
 }
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-r4

QuestionnaireResponse.QuestionnaireResponseItemComponent q = g.addItem();
q.setLinkId(g.getLinkId()+"._type");
q.setText("type");
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-r4

if (child != null) {
 if (aq == null) {
  aq = ag.addItem();
  aq.setLinkId(result.getLinkId());
  aq.setText(result.getText());
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-r4

@Override
public Base addChild(String name) throws FHIRException {
 if (name.equals("linkId")) {
  throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.linkId");
 }
 else if (name.equals("definition")) {
  throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.definition");
 }
 else if (name.equals("text")) {
  throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.text");
 }
 else if (name.equals("answer")) {
  return addAnswer();
 }
 else if (name.equals("item")) {
  return addItem();
 }
 else
  return super.addChild(name);
}
origin: ca.uhn.hapi.fhir/hapi-fhir-converter

 public org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent convertQuestionnaireResponseGroupComponent(org.hl7.fhir.instance.model.QuestionnaireResponse.GroupComponent src) throws FHIRException {
  if (src == null || src.isEmpty())
   return null;
  org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent();
  copyElement(src, tgt);
  tgt.setLinkId(src.getLinkId());
  tgt.setText(src.getText());
//    tgt.setSubject(convertReference(src.getSubject()));
  for (org.hl7.fhir.instance.model.QuestionnaireResponse.GroupComponent t : src.getGroup())
   tgt.addItem(convertQuestionnaireResponseGroupComponent(t));
  for (org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionComponent t : src.getQuestion())
   tgt.addItem(convertQuestionnaireResponseQuestionComponent(t));
  return tgt;
 }

origin: ca.uhn.hapi.fhir/hapi-fhir-converter

 public static org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent convertQuestionnaireResponseItemComponent(org.hl7.fhir.dstu2016may.model.QuestionnaireResponse.QuestionnaireResponseItemComponent src) throws FHIRException {
  if (src == null || src.isEmpty())
   return null;
  org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent();
  copyElement(src, tgt);
  if (src.hasLinkId())
   tgt.setLinkId(src.getLinkId());
  if (src.hasText())
   tgt.setText(src.getText());
//    tgt.setSubject(convertReference(src.getSubject()));
  for (org.hl7.fhir.dstu2016may.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer())
   tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t));
  for (org.hl7.fhir.dstu2016may.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem())
   tgt.addItem(convertQuestionnaireResponseItemComponent(t));
  return tgt;
 }

origin: ca.uhn.hapi.fhir/hapi-fhir-structures-r4

private void processExisting(String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> nResponse) throws FHIRException {
 // processing existing data
 for (QuestionnaireResponse.QuestionnaireResponseItemComponent ag : answerGroups) {
  List<Base> children = ((Element) ag.getUserData("object")).listChildrenByName(tail(path));
  for (Base child : children) {
   if (child != null) {
    QuestionnaireResponse.QuestionnaireResponseItemComponent ans = ag.addItem();
    ans.setUserData("object", child);
    nResponse.add(ans);
   }
  }
 }
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-r4

@Override
public Base makeProperty(int hash, String name) throws FHIRException {
 switch (hash) {
 case -1102667083:  return getLinkIdElement();
 case -1014418093:  return getDefinitionElement();
 case 3556653:  return getTextElement();
 case -1412808770:  return addAnswer(); 
 case 3242771:  return addItem(); 
 default: return super.makeProperty(hash, name);
 }
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-r4

/**
 * @return The first repetition of repeating field {@link #item}, creating it if it does not already exist
 */
public QuestionnaireResponseItemComponent getItemFirstRep() { 
 if (getItem().isEmpty()) {
  addItem();
 }
 return getItem().get(0);
}
origin: jamesagnew/hapi-fhir

QuestionnaireResponse.QuestionnaireResponseItemComponent q = g.addItem();
q.setLinkId(g.getLinkId()+"._type");
q.setText("type");
origin: jamesagnew/hapi-fhir

if (child != null) {
 if (aq == null) {
  aq = ag.addItem();
  aq.setLinkId(result.getLinkId());
  aq.setText(result.getText());
origin: jamesagnew/hapi-fhir

 public static org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent convertQuestionnaireResponseItemComponent(org.hl7.fhir.dstu2016may.model.QuestionnaireResponse.QuestionnaireResponseItemComponent src) throws FHIRException {
  if (src == null || src.isEmpty())
   return null;
  org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent();
  copyElement(src, tgt);
  if (src.hasLinkId())
   tgt.setLinkId(src.getLinkId());
  if (src.hasText())
   tgt.setText(src.getText());
//    tgt.setSubject(convertReference(src.getSubject()));
  for (org.hl7.fhir.dstu2016may.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer())
   tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t));
  for (org.hl7.fhir.dstu2016may.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem())
   tgt.addItem(convertQuestionnaireResponseItemComponent(t));
  return tgt;
 }

origin: jamesagnew/hapi-fhir

 public org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent convertQuestionnaireResponseGroupComponent(org.hl7.fhir.instance.model.QuestionnaireResponse.GroupComponent src) throws FHIRException {
  if (src == null || src.isEmpty())
   return null;
  org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent();
  copyElement(src, tgt);
  tgt.setLinkId(src.getLinkId());
  tgt.setText(src.getText());
//    tgt.setSubject(convertReference(src.getSubject()));
  for (org.hl7.fhir.instance.model.QuestionnaireResponse.GroupComponent t : src.getGroup())
   tgt.addItem(convertQuestionnaireResponseGroupComponent(t));
  for (org.hl7.fhir.instance.model.QuestionnaireResponse.QuestionComponent t : src.getQuestion())
   tgt.addItem(convertQuestionnaireResponseQuestionComponent(t));
  return tgt;
 }

origin: jamesagnew/hapi-fhir

@Override
public Base makeProperty(int hash, String name) throws FHIRException {
 switch (hash) {
 case -1102667083:  return getLinkIdElement();
 case -1014418093:  return getDefinitionElement();
 case 3556653:  return getTextElement();
 case -1412808770:  return addAnswer(); 
 case 3242771:  return addItem(); 
 default: return super.makeProperty(hash, name);
 }
}
org.hl7.fhir.r4.modelQuestionnaireResponse$QuestionnaireResponseItemComponentaddItem

Popular methods of QuestionnaireResponse$QuestionnaireResponseItemComponent

  • <init>
    Constructor
  • addAnswer
  • getAnswer
  • getItem
  • getLinkId
  • isEmpty
  • setLinkId
  • setText
  • castToString
  • castToUri
  • compareDeep
  • compareValues
  • compareDeep,
  • compareValues,
  • copy,
  • copyValues,
  • getDefinitionElement,
  • getLinkIdElement,
  • getText,
  • getTextElement,
  • getUserData

Popular in Java

  • Reactive rest calls using spring rest template
  • runOnUiThread (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getExternalFilesDir (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • JList (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now