@Search public Observation search( @RequiredParam(name = "subject") ReferenceParam theSubject, @RequiredParam(name = "name") TokenOrListParam theName) { Observation o = new Observation(); o.setId("1"); o.getSubject().setReference(theSubject.getResourceType() + "/" + theSubject.getIdPart()); for (BaseCodingDt next : theName.getListAsCodings()) { o.getName().getCoding().add(new CodingDt(next)); } return o; }
@Search public List<IResource> search( @OptionalParam(name = MedicationOrder.SP_PATIENT) ReferenceParam patient, @OptionalParam(name = MedicationOrder.SP_ENCOUNTER) ReferenceParam encounter, @OptionalParam(name = MedicationOrder.SP_DATEWRITTEN) DateParam datewritten, @IncludeParam Set<Include> includeParams) { Params params = Params.empty(); if (patient != null) { params.add(MedicationOrder.SP_PATIENT, patient.getValue()); } if (encounter != null) { params.add(MedicationOrder.SP_ENCOUNTER, encounter.getValue()); } if (datewritten != null) { params.add(MedicationOrder.SP_DATEWRITTEN, datewritten.getValue()); } return getResourceDao().search(params, includeParams); }
public List<FamilyMemberHistory> searchFamilyHistoryByPerson(ReferenceParam id) { FamilyMemberHistoryService familyHistoryService = Context.getService(FamilyMemberHistoryService.class); return familyHistoryService.searchFamilyHistoryByPersonId(id.getIdPart()); }