org.hl7.fhir.dstu3.model.Immunization Java Examples

The following examples show how to use org.hl7.fhir.dstu3.model.Immunization. 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
Source File: ImmunizationProvider.java    From careconnect-reference-implementation with Apache License 2.0 6 votes vote down vote up
@Update
public MethodOutcome update(HttpServletRequest theRequest, @ResourceParam Immunization immunisation, @IdParam IdType theId, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) {
	resourcePermissionProvider.checkPermission("update");
    MethodOutcome method = new MethodOutcome();
    method.setCreated(true);
    OperationOutcome opOutcome = new OperationOutcome();
    method.setOperationOutcome(opOutcome);
    try {
        Immunization newImmunisation = immunisationDao.create(ctx,immunisation, theId, theConditional);
        method.setId(newImmunisation.getIdElement());
        method.setResource(newImmunisation);
    } catch (Exception ex) {

        ProviderResponseLibrary.handleException(method,ex);
    }


    return method;
}
 
Example #2
Source File: ImmunizationProvider.java    From careconnect-reference-implementation with Apache License 2.0 6 votes vote down vote up
@Create
public MethodOutcome create(HttpServletRequest theRequest, @ResourceParam Immunization immunisation) {

	resourcePermissionProvider.checkPermission("create");
    MethodOutcome method = new MethodOutcome();
    method.setCreated(true);
    OperationOutcome opOutcome = new OperationOutcome();
    method.setOperationOutcome(opOutcome);

    try {
    Immunization newImmunisation = immunisationDao.create(ctx,immunisation, null, null);
    method.setId(newImmunisation.getIdElement());
    method.setResource(newImmunisation);
    } catch (Exception ex) {

        ProviderResponseLibrary.handleException(method,ex);
    }


    return method;
}
 
Example #3
Source File: ImmunizationRepository.java    From careconnect-reference-implementation with Apache License 2.0 5 votes vote down vote up
List<Immunization> search(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 #4
Source File: ImmunizationRepository.java    From careconnect-reference-implementation with Apache License 2.0 5 votes vote down vote up
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 #5
Source File: ImmunizationProvider.java    From careconnect-reference-implementation with Apache License 2.0 5 votes vote down vote up
@Search
public List<Immunization> search(HttpServletRequest theRequest,
                                      @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 resid
        , @OptionalParam(name= "vaccination-procedure") TokenParam procedureCode
        , @OptionalParam(name= Immunization.SP_NOTGIVEN) TokenParam notGiven
){
    return immunisationDao.search(ctx,patient,date, status, identifier,resid, procedureCode, notGiven);
}
 
Example #6
Source File: ImmunizationProvider.java    From careconnect-reference-implementation with Apache License 2.0 5 votes vote down vote up
@Read()
public Immunization get(@IdParam IdType immunisationId) {
	resourcePermissionProvider.checkPermission("read");
    Immunization immunisation = immunisationDao.read(ctx,immunisationId);

    if ( immunisation == null) {
        throw OperationOutcomeFactory.buildOperationOutcomeException(
                new ResourceNotFoundException("No Immunisation/ " + immunisationId.getIdPart()),
                OperationOutcome.IssueType.NOTFOUND);
    }

    return immunisation;
}
 
Example #7
Source File: ImmunisationEntity.java    From careconnect-reference-implementation with Apache License 2.0 4 votes vote down vote up
public Immunization.ImmunizationStatus getStatus() {
    return status;
}
 
Example #8
Source File: ImmunisationEntity.java    From careconnect-reference-implementation with Apache License 2.0 4 votes vote down vote up
public ImmunisationEntity setStatus(Immunization.ImmunizationStatus status) {
    this.status = status;
    return this;
}
 
Example #9
Source File: ImmunizationProvider.java    From careconnect-reference-implementation with Apache License 2.0 4 votes vote down vote up
@Override
public Class<? extends IBaseResource> getResourceType() {
    return Immunization.class;
}
 
Example #10
Source File: ImmunizationProvider.java    From careconnect-reference-implementation with Apache License 2.0 4 votes vote down vote up
@Validate
public MethodOutcome testResource(@ResourceParam Immunization resource,
                              @Validate.Mode ValidationModeEnum theMode,
                              @Validate.Profile String theProfile) {
    return resourceTestProvider.testResource(resource,theMode,theProfile);
}
 
Example #11
Source File: ListProvider.java    From careconnect-reference-implementation with Apache License 2.0 4 votes vote down vote up
@Validate
public MethodOutcome testResource(@ResourceParam Immunization resource,
                              @Validate.Mode ValidationModeEnum theMode,
                              @Validate.Profile String theProfile) {
    return resourceTestProvider.testResource(resource,theMode,theProfile);
}
 
Example #12
Source File: ImmunizationRepository.java    From careconnect-reference-implementation with Apache License 2.0 votes vote down vote up
Immunization read(FhirContext ctx, IdType theId); 
Example #13
Source File: ImmunizationRepository.java    From careconnect-reference-implementation with Apache License 2.0 votes vote down vote up
Immunization create(FhirContext ctx,Immunization immunisation, @IdParam IdType theId, @ConditionalUrlParam String theImmunizational) throws OperationOutcomeException;