IFhirResourceDao<? extends IBaseResource> dao = getDao(theResourceType); BaseHasResource entity = dao.readEntity(theResourceId); TagList retVal = new TagList(); for (BaseTag next : entity.getTags()) { retVal.add(next.getTag().toTag()); findMatchingTagIds(resourceName, theResourceId, tagIds, ResourceHistoryTag.class); if (tagIds.isEmpty()) { return new TagList(); q.setMaxResults(getConfig().getHardTagListLimit()); TagList retVal = new TagList(); for (TagDefinition next : q.getResultList()) { retVal.add(next.toTag());
protected TagList getMetaTagsForEncoding(IResource theIResource) { TagList tags = ResourceMetadataKeyEnum.TAG_LIST.get(theIResource); if (shouldAddSubsettedTag()) { tags = new TagList(tags); tags.add(new Tag(getSubsettedCodeSystem(), Constants.TAG_SUBSETTED_CODE, subsetDescription())); } return tags; }
@Search public List<Patient> getAllPatients() { ArrayList<Patient> retVal = new ArrayList<Patient>(); // Create a patient to return Patient patient = new Patient(); patient.setId("Patient/123"); patient.addName().addFamily("Smith").addGiven("John"); // Create a tag list and add it to the resource TagList tags = new TagList(); ResourceMetadataKeyEnum.TAG_LIST.put(patient, tags); // Add some tags to the list tags.addTag(Tag.HL7_ORG_FHIR_TAG, "http://foo/tag1.html", "Some tag"); tags.addTag(Tag.HL7_ORG_FHIR_TAG, "http://foo/tag2.html", "Another tag"); return retVal; } // END SNIPPET: serverMethod
TagList tags = new TagList(); tags.addTag(Tag.HL7_ORG_FHIR_TAG, "http://foo/tag1.html", "Some tag"); tags.addTag(Tag.HL7_ORG_FHIR_TAG, "http://foo/tag2.html", "Another tag");
TagList tagList = new TagList(); List<IBaseCoding> securityLabels = new ArrayList<>(); List<IdDt> profiles = new ArrayList<>();
@Override public IBaseCoding addTag() { TagList tagList = ResourceMetadataKeyEnum.TAG_LIST.get(BaseResource.this); if (tagList == null) { tagList = new TagList(); ResourceMetadataKeyEnum.TAG_LIST.put(BaseResource.this, tagList); } Tag tag = new Tag(); tagList.add(tag); return tag; }
@Override public IBaseCoding addTag() { TagList tagList = ResourceMetadataKeyEnum.TAG_LIST.get(BaseResource.this); if (tagList == null) { tagList = new TagList(); ResourceMetadataKeyEnum.TAG_LIST.put(BaseResource.this, tagList); } Tag tag = new Tag(); tagList.add(tag); return tag; }
IFhirResourceDao<? extends IBaseResource> dao = getDao(theResourceType); BaseHasResource entity = dao.readEntity(theResourceId); TagList retVal = new TagList(); for (BaseTag next : entity.getTags()) { retVal.add(next.getTag().toTag()); findMatchingTagIds(resourceName, theResourceId, tagIds, ResourceHistoryTag.class); if (tagIds.isEmpty()) { return new TagList(); q.setMaxResults(getConfig().getHardTagListLimit()); TagList retVal = new TagList(); for (TagDefinition next : q.getResultList()) { retVal.add(next.toTag());
protected TagList getMetaTagsForEncoding(IResource theIResource, EncodeContext theEncodeContext) { TagList tags = ResourceMetadataKeyEnum.TAG_LIST.get(theIResource); if (shouldAddSubsettedTag(theEncodeContext)) { tags = new TagList(tags); tags.add(new Tag(getSubsettedCodeSystem(), Constants.TAG_SUBSETTED_CODE, subsetDescription())); } return tags; }
private void addProfileIfNeeded(IRestfulServer<?> theServer, String theServerBase, IBaseResource nextRes) { RuntimeResourceDefinition def = theServer.getFhirContext().getResourceDefinition(nextRes); if (theServer.getAddProfileTag() == AddProfileTagEnum.ALWAYS || !def.isStandardType()) { TagList tl = ResourceMetadataKeyEnum.TAG_LIST.get((IResource) nextRes); if (tl == null) { tl = new TagList(); ResourceMetadataKeyEnum.TAG_LIST.put((IResource) nextRes, tl); } RuntimeResourceDefinition nextDef = myContext.getResourceDefinition(nextRes); String profile = nextDef.getResourceProfile(theServerBase); if (isNotBlank(profile)) { tl.add(new Tag(Tag.HL7_ORG_PROFILE_TAG, profile, null)); } } }
TagList tagList = new TagList(); List<IBaseCoding> securityLabels = new ArrayList<>(); List<IdDt> profiles = new ArrayList<>();