@Search()
    public List<Patient> findPatientWithToken(
        @RequiredParam(name = "tokenParam") TokenParam theParam) {
      ArrayList<Patient> retVal = new ArrayList<Patient>();

      Patient patient = new Patient();
      patient.setId("1");
      patient.addName().addFamily(theParam.getSystem()).addGiven(theParam.getValue());
      retVal.add(patient);
      return retVal;
    }
 // search by patient identifier. ex: GET_DESCRIPTION [base-url]/Practitioner?identifier=12345
 // returns a bundle of practitioners
 public List<Practitioner> searchByIdentifier(TokenParam identifier) {
   org.openmrs.module.fhir.api.PractitionerService patientService =
       Context.getService(org.openmrs.module.fhir.api.PractitionerService.class);
   return patientService.searchPractitionersByIdentifier(identifier.getValue());
 }
 public List<FamilyMemberHistory> searchFamilyHistoryByUniqueId(TokenParam id) {
   FamilyMemberHistoryService familyHistoryService =
       Context.getService(FamilyMemberHistoryService.class);
   return familyHistoryService.searchRelationshipsById(id.getValue());
 }