Java Code Examples for ca.uhn.fhir.rest.param.StringParam

The following examples show how to use ca.uhn.fhir.rest.param.StringParam. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
public List<Resource> search(FhirContext ctx, ReferenceParam patient, TokenParam identifier, StringParam id
        , @OptionalParam(name = Task.SP_OWNER) ReferenceParam owner
        , @OptionalParam(name = Task.SP_REQUESTER) ReferenceParam requester
        , @OptionalParam(name = Task.SP_STATUS) TokenParam status
        , @OptionalParam(name = Task.SP_CODE) TokenParam code
) {

    List<TaskEntity> qryResults =  searchEntity(ctx,patient, identifier,id, owner, requester, status,code);
    List<Resource> results = new ArrayList<>();

    for (TaskEntity taskIntoleranceEntity : qryResults)
    {
        // log.trace("HAPI Custom = "+doc.getId());
        Task task = taskEntityToFHIRTask.transform(taskIntoleranceEntity, ctx);
        results.add(task);
    }

    return results;
}
 
Example 2
List<Resource> search(FhirContext ctx,

                          @OptionalParam(name = Encounter.SP_PATIENT) ReferenceParam patient
            , @OptionalParam(name = Encounter.SP_DATE) DateRangeParam date
            , @OptionalParam(name = Encounter.SP_EPISODEOFCARE) ReferenceParam episode
            , @OptionalParam(name = Encounter.SP_IDENTIFIER) TokenParam identifier
            , @OptionalParam(name= Encounter.SP_RES_ID) StringParam id
            , @IncludeParam(reverse=true, allow = {
            "Observation:context",
            "Encounter:part-of",
            "Procedure:context",
            "Condition:context",
            "MedicationRequest:context",
            "Immunization:encounter" ,
            "DocumentReference:context",
            "Composition:encounter",
            "ReferralRequest:encounter",
            "MedicationDispense:context",
            "MedicationAdministration:context",
            "*"
    }) Set<Include> reverseIncludes
            , @IncludeParam(allow = { "Encounter.participant" , "Encounter.service-provider", "Encounter.location", "*"
    }) Set<Include> includes
            , @OptionalParam(name = Encounter.SP_TYPE) TokenParam type
            , @OptionalParam(name = Encounter.SP_STATUS) TokenParam status
    );
 
Example 3
@Override
public List<Resource> search(FhirContext ctx, ReferenceParam patient, TokenParam identifier, StringParam id
        , @OptionalParam(name = Claim.SP_USE) TokenParam use
        , @OptionalParam(name = "status") TokenParam status) {

    List<ClaimEntity> qryResults =  searchEntity(ctx,patient, identifier,id, use, status);
    List<Resource> results = new ArrayList<>();

    for (ClaimEntity claimIntoleranceEntity : qryResults)
    {
        // log.trace("HAPI Custom = "+doc.getId());
        Claim claim = claimEntityToFHIRClaim.transform(claimIntoleranceEntity, ctx);
        results.add(claim);
    }

    return results;
}
 
Example 4
public List<MessageDefinition> search (FhirContext ctx,
                                       @OptionalParam(name = MessageDefinition.SP_NAME) StringParam name,
                                       @OptionalParam(name = MessageDefinition.SP_PUBLISHER) StringParam publisher,
                                       @OptionalParam(name = MessageDefinition.SP_URL) UriParam url,
                                       @OptionalParam(name = MessageDefinition.SP_IDENTIFIER) TokenParam identifier
) {
    List<MessageDefinitionEntity> qryResults = searchEntity(ctx, name, publisher, url, identifier);
    List<MessageDefinition> results = new ArrayList<MessageDefinition>();

    for (MessageDefinitionEntity messageDefinitionEntity : qryResults)
    {
        if (messageDefinitionEntity.getResource() != null) {
            results.add((MessageDefinition) ctx.newJsonParser().parseResource(messageDefinitionEntity.getResource()));
        } else {

            MessageDefinition messageDefinition = messageDefinitionEntityToFHIRValuesetTransformer.transform(messageDefinitionEntity);
            String resource = ctx.newJsonParser().encodeResourceToString(messageDefinition);
            if (resource.length() < 10000) {
                messageDefinitionEntity.setResource(resource);
                em.persist(messageDefinitionEntity);
            }
            results.add(messageDefinition);
        }
    }
    return results;
}
 
Example 5
public List<StructureDefinition> search (FhirContext ctx,
									  @OptionalParam(name = StructureDefinition.SP_NAME) StringParam name,
									  @OptionalParam(name = StructureDefinition.SP_PUBLISHER) StringParam publisher,
									  @OptionalParam(name = StructureDefinition.SP_URL) UriParam url
) {
	List<StructureDefinitionEntity> qryResults = searchEntity(ctx,name,publisher, url);
	List<StructureDefinition> results = new ArrayList<>();

	for (StructureDefinitionEntity structureDefinitionEntity : qryResults)
	{

		StructureDefinition structureDefinition = structureDefinitionEntityToFHIRStructureDefinitionTransformer.transform(structureDefinitionEntity, ctx);

		results.add(structureDefinition);

	}
	return results;
}
 
Example 6
public List<GraphDefinition> search (FhirContext ctx,
                              @OptionalParam(name = GraphDefinition.SP_NAME) StringParam name,
                              @OptionalParam(name = GraphDefinition.SP_PUBLISHER) StringParam publisher,
                              @OptionalParam(name = GraphDefinition.SP_URL) UriParam url

) {
    List<GraphDefinition> results = new ArrayList<>();
    List<GraphDefinitionEntity> qryResults = searchEntity(ctx, name, publisher, url);

    for (GraphDefinitionEntity graphEntity : qryResults) {
        if (graphEntity.getResource() != null) {
            results.add((GraphDefinition) ctx.newJsonParser().parseResource(graphEntity.getResource()));
        } else {

            GraphDefinition graph = graphEntityToFHIRValuesetTransformer.transform(graphEntity);
            String resource = ctx.newJsonParser().encodeResourceToString(graph);
            if (resource.length() < 10000) {
                graphEntity.setResource(resource);
                em.persist(graphEntity);
            }
            results.add(graph);
        }
    }
    return results;
}
 
Example 7
@Override
public List<Resource> search(FhirContext ctx,
                             @OptionalParam(name = Person.SP_NAME) StringParam name,
                             @OptionalParam(name = Person.SP_IDENTIFIER) TokenParam identifier,
                             @OptionalParam(name = Person.SP_EMAIL) TokenParam email,
                             @OptionalParam(name = Person.SP_PHONE) TokenParam phone

) {
    List<PersonEntity> qryResults = searchEntity(ctx, name, identifier,email, phone);
    List<Resource> results = new ArrayList<>();

    for (PersonEntity personEntity : qryResults) {
        log.info("personEntity = " + personEntity.getId().toString());
        Person person = personEntityToFHIRPersonTransformer.transform(personEntity);
        String resourceStr = ctx.newJsonParser().encodeResourceToString(person);
        personEntity.setResource(resourceStr);

        results.add(person);

        // If reverse include selected

    }


    return results;
}
 
Example 8
@Override
public List<EpisodeOfCare> search(FhirContext ctx,ReferenceParam patient, DateRangeParam date, StringParam resid, TokenParam identifier) {

    List<EpisodeOfCareEntity> qryResults = searchEntity(ctx,patient, date,resid,identifier);
    List<EpisodeOfCare> results = new ArrayList<>();

    for (EpisodeOfCareEntity episodeEntity : qryResults)
    {
        // log.trace("HAPI Custom = "+doc.getId());
        EpisodeOfCare episode = episodeOfCareEntityToFHIREpisodeOfCareTransformer.transform(episodeEntity);
        results.add(episode);
    }

    return results;
}
 
Example 9
@Search
public List<MedicationAdministration> search(HttpServletRequest theRequest,
                                       @OptionalParam(name = MedicationAdministration.SP_PATIENT) ReferenceParam patient
        , @OptionalParam(name = MedicationAdministration.SP_STATUS) TokenParam status
        , @OptionalParam(name = MedicationAdministration.SP_RES_ID) StringParam id
        , @OptionalParam(name = MedicationAdministration.SP_IDENTIFIER) TokenParam identifier
        , @OptionalParam(name = MedicationAdministration.SP_CODE) TokenParam code
        , @OptionalParam(name= MedicationAdministration.SP_MEDICATION) ReferenceParam medication
                                      ) {
    return administrationDao.search(ctx,patient, status, id, identifier,code, medication );
}
 
Example 10
@Override
public List<Endpoint> searchEndpoint(FhirContext ctx, TokenParam identifier, StringParam resid) {
    List<EndpointEntity> qryResults = searchEndpointEntity(ctx,identifier,resid);
    List<Endpoint> results = new ArrayList<>();

    for (EndpointEntity endpointEntity : qryResults)
    {
        Endpoint endpoint = endpointEntityToFHIREndpointTransform.transform(endpointEntity);
        results.add(endpoint);
    }

    return results;
}
 
Example 11
List<MedicationAdministrationEntity> searchEntity(FhirContext ctx,
                                            @OptionalParam(name = MedicationAdministration.SP_PATIENT) ReferenceParam patient
        , @OptionalParam(name = MedicationAdministration.SP_STATUS) TokenParam status
        , @OptionalParam(name = MedicationAdministration.SP_RES_ID) StringParam id
        , @OptionalParam(name = MedicationAdministration.SP_IDENTIFIER) TokenParam identifier
        , @OptionalParam(name = MedicationAdministration.SP_CODE) TokenParam code
        , @OptionalParam(name = MedicationAdministration.SP_MEDICATION) ReferenceParam medication
);
 
Example 12
@Search
public List<ClinicalImpression> search(HttpServletRequest theRequest,
                             @OptionalParam(name = ClinicalImpression.SP_PATIENT) ReferenceParam patient
        , @OptionalParam(name = ClinicalImpression.SP_IDENTIFIER) TokenParam identifier
        , @OptionalParam(name = ClinicalImpression.SP_RES_ID) StringParam id
) {
    return impressionDao.search(ctx,patient, identifier,id);
}
 
Example 13
@Search
public List<Slot> searchSlot(HttpServletRequest theRequest,
                             @OptionalParam(name = Slot.SP_IDENTIFIER) TokenParam identifier,
                             @OptionalParam(name = Slot.SP_START) DateParam start,
                             @OptionalParam(name = Slot.SP_STATUS) StringParam status,
                             @OptionalParam(name = Slot.SP_RES_ID) StringParam id,
                             @OptionalParam(name =Slot.SP_SCHEDULE) ReferenceParam schedule,
                             @OptionalParam(name = "service") ReferenceParam service
)

{
    return slotDao.searchSlot(ctx, identifier,start,status,id,schedule,service);
}
 
Example 14
@Override
public List<Slot> searchSlot(FhirContext ctx, TokenParam identifier, DateParam start, StringParam status, StringParam res_id, ReferenceParam schedule, ReferenceParam service) {
    List<SlotEntity> qryResults = searchSlotEntity(ctx,identifier,start,status,res_id,schedule, service);
    List<Slot> results = new ArrayList<>();

    for (SlotEntity slotEntity : qryResults) {
        Slot slot = slotEntityToFHIRSlotTransformer.transform(slotEntity);
        results.add(slot);
    }

    return results;
}
 
Example 15
List<Slot> searchSlot(FhirContext ctx,
                      @OptionalParam(name = Slot.SP_IDENTIFIER) TokenParam identifier,
                      @OptionalParam(name = Slot.SP_START) DateParam start,
                      @OptionalParam(name = Slot.SP_STATUS) StringParam status,
                      @OptionalParam(name = Slot.SP_RES_ID) StringParam id,
                      @OptionalParam(name = Slot.SP_SCHEDULE) ReferenceParam schedule,
                      @OptionalParam(name = "service") ReferenceParam service
);
 
Example 16
List<Composition> search(FhirContext ctx,

              @OptionalParam(name = Condition.SP_PATIENT) ReferenceParam patient
            , @OptionalParam(name = Composition.SP_IDENTIFIER) TokenParam identifier
            , @OptionalParam(name = Composition.SP_RES_ID) StringParam id
            , @OptionalParam(name = Composition.SP_TYPE) TokenParam type
            , @OptionalParam(name = Composition.SP_PERIOD)DateRangeParam dateRange

    );
 
Example 17
List<CompositionEntity> searchEntity(FhirContext ctx,
          @OptionalParam(name = Composition.SP_PATIENT) ReferenceParam patient
        , @OptionalParam(name = Condition.SP_IDENTIFIER) TokenParam identifier
        , @OptionalParam(name = Condition.SP_RES_ID) StringParam id
        , @OptionalParam(name = Composition.SP_TYPE) TokenParam type
        , @OptionalParam(name = Composition.SP_PERIOD)DateRangeParam dateRange
);
 
Example 18
@Override
public List<Goal> search(FhirContext ctx, ReferenceParam patient, TokenParam identifier, StringParam id) {
    List<GoalEntity> qryResults = searchEntity(ctx,patient, identifier,id);
    List<Goal> results = new ArrayList<>();

    for (GoalEntity goalIntoleranceEntity : qryResults)
    {
        // log.trace("HAPI Custom = "+doc.getId());
        Goal goal = goalEntityToFHIRGoalTransformer.transform(goalIntoleranceEntity);
        results.add(goal);
    }

    return results;
}
 
Example 19
@Search
public List<Condition> search(HttpServletRequest theRequest,
                              @OptionalParam(name = Condition.SP_PATIENT) ReferenceParam patient
        , @OptionalParam(name = Condition.SP_CATEGORY) TokenParam category
        , @OptionalParam(name = Condition.SP_CLINICAL_STATUS) TokenParam clinicalstatus
        , @OptionalParam(name = Condition.SP_ASSERTED_DATE) DateRangeParam asserted
        , @OptionalParam(name = Condition.SP_IDENTIFIER) TokenParam identifier
        , @OptionalParam(name = Condition.SP_RES_ID) StringParam resid
                              ) {
    return conditionDao.search(ctx,patient, category, clinicalstatus, asserted, identifier,resid);
}
 
Example 20
@Override
public List<Flag> searchFlag(FhirContext ctx, TokenParam identifier, StringParam id, ReferenceParam patient) {
    List<FlagEntity> qryResults = searchFlagEntity(ctx, identifier, id,  patient);
    List<Flag> results = new ArrayList<>();

    for (FlagEntity flag : qryResults)
    {
        // log.trace("HAPI Custom = "+doc.getId());
        Flag questionnaireResponse = flagEntityToFHIRFlagTransformer.transform(flag);
        results.add(questionnaireResponse);
    }

    return results;
}
 
Example 21
@Override
public List<MedicationDispense> search(FhirContext ctx, ReferenceParam patient, TokenParam status, StringParam id, TokenParam identifier, TokenParam code, ReferenceParam medication) {
    List<MedicationDispenseEntity> qryResults = searchEntity(ctx,patient, status,id,identifier,code,medication);
    List<MedicationDispense> results = new ArrayList<>();

    for (MedicationDispenseEntity medicationDispenseIntoleranceEntity : qryResults) {
        MedicationDispense medicationDispense = medicationDispenseEntityToFHIRMedicationDispenseTransformer.transform(medicationDispenseIntoleranceEntity);
        results.add(medicationDispense);
    }

    return results;
}
 
Example 22
@Search
public List<MessageDefinition> search(HttpServletRequest theRequest,
          @OptionalParam(name =MessageDefinition.SP_NAME) StringParam name,
           @OptionalParam(name =MessageDefinition.SP_PUBLISHER) StringParam publisher,
                             @OptionalParam(name = MessageDefinition.SP_URL) UriParam url,
                             @OptionalParam(name = MessageDefinition.SP_IDENTIFIER) TokenParam identifier
) {
    return messageDefinitionDao.search(ctx, name, publisher, url,identifier);
}
 
Example 23
@Search
public List<Resource> search(HttpServletRequest theRequest,
                             @OptionalParam(name = Task.SP_PATIENT) ReferenceParam patient
        , @OptionalParam(name = Task.SP_IDENTIFIER) TokenParam identifier
        , @OptionalParam(name = Task.SP_RES_ID) StringParam id
        , @OptionalParam(name = Task.SP_OWNER) ReferenceParam owner
        , @OptionalParam(name = Task.SP_REQUESTER) ReferenceParam requester
        , @OptionalParam(name = Task.SP_STATUS) TokenParam status
        , @OptionalParam(name = Task.SP_CODE) TokenParam code
) {
    return taskDao.search(ctx,patient, identifier,id, owner, requester,status, code);
}
 
Example 24
List<ImmunisationEntity> searchEntity(FhirContext ctx,
        @OptionalParam(name = Immunization.SP_PATIENT) ReferenceParam patient
        , @OptionalParam(name = Immunization.SP_DATE) DateRangeParam date
        , @OptionalParam(name = Immunization.SP_STATUS) TokenParam status
        , @OptionalParam(name = Immunization.SP_IDENTIFIER) TokenParam identifier
        , @OptionalParam(name= Immunization.SP_RES_ID) StringParam id
        , @OptionalParam(name= "vaccination-procedure") TokenParam procedureCode
        , @OptionalParam(name= Immunization.SP_NOTGIVEN) TokenParam notGiven
);
 
Example 25
List<MedicationDispense> search(FhirContext ctx,

                                     @OptionalParam(name = MedicationDispense.SP_PATIENT) ReferenceParam patient
            , @OptionalParam(name = MedicationDispense.SP_STATUS) TokenParam status
            , @OptionalParam(name = MedicationDispense.SP_RES_ID) StringParam id
            , @OptionalParam(name = MedicationDispense.SP_IDENTIFIER) TokenParam identifier
            , @OptionalParam(name = MedicationDispense.SP_CODE) TokenParam code
            , @OptionalParam(name= MedicationDispense.SP_MEDICATION) ReferenceParam medication

    );
 
Example 26
List<MedicationDispenseEntity> searchEntity(FhirContext ctx,
                                             @OptionalParam(name = MedicationDispense.SP_PATIENT) ReferenceParam patient
        , @OptionalParam(name = MedicationDispense.SP_STATUS) TokenParam status
        , @OptionalParam(name = MedicationDispense.SP_RES_ID) StringParam id
        , @OptionalParam(name = MedicationDispense.SP_IDENTIFIER) TokenParam identifier
        , @OptionalParam(name = MedicationDispense.SP_CODE) TokenParam code
        , @OptionalParam(name= MedicationDispense.SP_MEDICATION) ReferenceParam medication
);
 
Example 27
@Search
public List<CareTeam> search(HttpServletRequest theRequest,
                             @OptionalParam(name = CareTeam.SP_PATIENT) ReferenceParam patient
        , @OptionalParam(name = CareTeam.SP_IDENTIFIER) TokenParam identifier
        , @OptionalParam(name = CareTeam.SP_RES_ID) StringParam id
) {
    return careTeamDao.search(ctx,patient, identifier,id);
}
 
Example 28
List<MedicationRequestEntity> searchEntity(FhirContext ctx,
        @OptionalParam(name = MedicationRequest.SP_PATIENT) ReferenceParam patient
        , @OptionalParam(name = MedicationRequest.SP_CODE) TokenParam code
        , @OptionalParam(name = MedicationRequest.SP_AUTHOREDON) DateRangeParam dateWritten
        , @OptionalParam(name = MedicationRequest.SP_STATUS) TokenParam status
        , @OptionalParam(name = MedicationRequest.SP_IDENTIFIER) TokenParam identifier
        ,@OptionalParam(name= MedicationRequest.SP_RES_ID) StringParam id
        , @OptionalParam(name= MedicationRequest.SP_MEDICATION) ReferenceParam medication
);
 
Example 29
List<Resource> search(
        FhirContext ctx,
        @OptionalParam(name = Task.SP_PATIENT) ReferenceParam patient
        , @OptionalParam(name = Task.SP_IDENTIFIER) TokenParam identifier
        , @OptionalParam(name = Task.SP_RES_ID) StringParam id
        , @OptionalParam(name = Task.SP_OWNER) ReferenceParam owner
        , @OptionalParam(name = Task.SP_REQUESTER) ReferenceParam requester
        , @OptionalParam(name = Task.SP_STATUS) TokenParam status
        , @OptionalParam(name = Task.SP_CODE) TokenParam code

);
 
Example 30
@Override
public List<CareTeam> search(FhirContext ctx, ReferenceParam patient, TokenParam identifier, StringParam id) {
    List<CareTeamEntity> qryResults = searchEntity(ctx,patient, identifier,id);
    List<CareTeam> results = new ArrayList<>();

    for (CareTeamEntity teamIntoleranceEntity : qryResults)
    {
        // log.trace("HAPI Custom = "+doc.getId());
        CareTeam team = teamEntityToFHIRCareTeamTransformer.transform(teamIntoleranceEntity);
        results.add(team);
    }

    return results;
}