/** * This is translated into a URL similar to the following: * http://fhir.healthintersections.com.au/open/Patient?identifier=urn:oid:1.2.36.146.595.217.0.1%7C12345 */ @Search List<Patient> findPatientsForMrn(@RequiredParam(name = Patient.SP_IDENTIFIER) IdentifierDt theIdentifier);
@Validate public MethodOutcome validate(@ResourceParam T theResource, @ResourceParam String theRawResource, @ResourceParam EncodingEnum theEncoding, @Validate.Mode ValidationModeEnum theMode, @Validate.Profile String theProfile, RequestDetails theRequestDetails) { return validate(theResource, null, theRawResource, theEncoding, theMode, theProfile, theRequestDetails); }
@Operation(name = JpaConstants.OPERATION_EXPUNGE, idempotent = false, returnParameters = { @OperationParam(name = JpaConstants.OPERATION_EXPUNGE_OUT_PARAM_EXPUNGE_COUNT, type = IntegerType.class) }) public Parameters expunge( @IdParam IIdType theIdParam, @OperationParam(name = JpaConstants.OPERATION_EXPUNGE_PARAM_LIMIT) IntegerType theLimit, @OperationParam(name = JpaConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_DELETED_RESOURCES) BooleanType theExpungeDeletedResources, @OperationParam(name = JpaConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_PREVIOUS_VERSIONS) BooleanType theExpungeOldVersions, @OperationParam(name = JpaConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_EVERYTHING) BooleanType theExpungeEverything ) { return super.doExpunge(theLimit, theExpungeDeletedResources, theExpungeOldVersions, theExpungeEverything); }
/** * The "@Read" annotation indicates that this method supports the * read operation. Read operations should return a single resource * instance. * * @param theId * The read operation takes one parameter, which must be of type * IdDt and must be annotated with the "@Read.IdParam" annotation. * @return * Returns a resource matching this identifier, or null if none exists. */ @Read() public Patient getResourceById(@IdParam IdDt theId);
@Update public abstract MethodOutcome updateSomePatient(@IdParam IdType theId, @ResourceParam Patient thePatient); //END SNIPPET: updateClient
@Delete() public void deletePatientConditional(@IdParam IdType theId, @ConditionalUrlParam String theConditionalUrl) { // Only one of theId or theConditionalUrl will have a value depending // on whether the URL receieved was a logical ID, or a conditional // search string if (theId != null) { // do a normal delete } else { // do a conditional delete } // otherwise, delete was successful return; // can also return MethodOutcome } //END SNIPPET: deleteConditional
/** A FHIR create */ @Create public MethodOutcome createPatient(@ResourceParam Patient thePatient);
@Validate public MethodOutcome validate(@ResourceParam T theResource, @ResourceParam String theRawResource, @ResourceParam EncodingEnum theEncoding, @Validate.Mode ValidationModeEnum theMode, @Validate.Profile String theProfile, RequestDetails theRequestDetails) { return validate(theResource, null, theRawResource, theEncoding, theMode, theProfile, theRequestDetails); }
@Operation(name = JpaConstants.OPERATION_EXPUNGE, idempotent = false, returnParameters = { @OperationParam(name = JpaConstants.OPERATION_EXPUNGE_OUT_PARAM_EXPUNGE_COUNT, type = IntegerType.class) }) public Parameters expunge( @IdParam IIdType theIdParam, @OperationParam(name = JpaConstants.OPERATION_EXPUNGE_PARAM_LIMIT) IntegerType theLimit, @OperationParam(name = JpaConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_DELETED_RESOURCES) BooleanType theExpungeDeletedResources, @OperationParam(name = JpaConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_PREVIOUS_VERSIONS) BooleanType theExpungeOldVersions ) { return super.doExpunge(theIdParam, theLimit, theExpungeDeletedResources, theExpungeOldVersions, null); }
/** A FHIR search */ @Search public List<Patient> findPatientsByIdentifier(@RequiredParam(name="identifier") IdentifierDt theIdentifier);
@Update public MethodOutcome updatePatientWithRawValue ( @ResourceParam Patient thePatient, @IdParam IdType theId, @ResourceParam String theRawBody, @ResourceParam EncodingEnum theEncodingEnum) { // Here, thePatient will have the parsed patient body, but // theRawBody will also have the raw text of the resource // being created, and theEncodingEnum will tell you which // encoding was used return new MethodOutcome(); // populate this } //END SNIPPET: updateRaw
@Validate public MethodOutcome validate(@ResourceParam T theResource, @ResourceParam String theRawResource, @ResourceParam EncodingEnum theEncoding, @Validate.Mode ValidationModeEnum theMode, @Validate.Profile String theProfile, RequestDetails theRequestDetails) { return validate(theResource, null, theRawResource, theEncoding, theMode, theProfile, theRequestDetails); }
@Operation(name="$everything", idempotent=true) public Bundle patientInstanceOperation( @IdParam IdDt thePatientId, @OperationParam(name="start") DateDt theStart, @OperationParam(name="end") DateDt theEnd) { Bundle retVal = new Bundle(); // Populate bundle with matching resources return retVal; } //END SNIPPET: patientInstanceOperation
@Validate public MethodOutcome validate(@ResourceParam T theResource, @IdParam IdType theId, @ResourceParam String theRawResource, @ResourceParam EncodingEnum theEncoding, @Validate.Mode ValidationModeEnum theMode, @Validate.Profile String theProfile, RequestDetails theRequestDetails) { return getDao().validate(theResource, theId, theRawResource, theEncoding, theMode, theProfile, theRequestDetails); }
@Operation(name = JpaConstants.OPERATION_TRIGGER_SUBSCRIPTION) public IBaseParameters triggerSubscription( @IdParam IIdType theSubscriptionId, @OperationParam(name = RESOURCE_ID, min = 0, max = OperationParam.MAX_UNLIMITED) List<UriParam> theResourceIds, @OperationParam(name = SEARCH_URL, min = 0, max = OperationParam.MAX_UNLIMITED) List<StringParam> theSearchUrls ) { return mySubscriptionTriggeringSvc.triggerSubscription(theResourceIds, theSearchUrls, theSubscriptionId); }
@Validate public MethodOutcome validate(@ResourceParam T theResource, @IdParam IdDt theId, @ResourceParam String theRawResource, @ResourceParam EncodingEnum theEncoding, @Validate.Mode ValidationModeEnum theMode, @Validate.Profile String theProfile, RequestDetails theRequestDetails) { return getDao().validate(theResource, theId, theRawResource, theEncoding, theMode, theProfile, theRequestDetails); }
@Validate public MethodOutcome validate(@ResourceParam T theResource, @IdParam IdType theId, @ResourceParam String theRawResource, @ResourceParam EncodingEnum theEncoding, @Validate.Mode ValidationModeEnum theMode, @Validate.Profile String theProfile, RequestDetails theRequestDetails) { return getDao().validate(theResource, theId, theRawResource, theEncoding, theMode, theProfile, theRequestDetails); }