Doc updates as suggested by David Hay
This commit is contained in:
parent
e7f34e8dbb
commit
bda33737f1
|
@ -97,10 +97,24 @@ public List<Organization> getAllOrganizations() {
|
|||
//END SNIPPET: searchAll
|
||||
|
||||
//START SNIPPET: searchCompartment
|
||||
@Search(compartmentName="fooCompartment")
|
||||
public List<IResource> searchCompartment(@IdParam IdDt theId) {
|
||||
List<IResource> retVal=new ArrayList<IResource>(); // populate this
|
||||
return retVal;
|
||||
public class PatientRp implements IResourceProvider {
|
||||
|
||||
@Override
|
||||
public Class<? extends IResource> getResourceType() {
|
||||
return Patient.class;
|
||||
}
|
||||
|
||||
@Search(compartmentName="Condition")
|
||||
public List<IResource> searchCompartment(@IdParam IdDt thePatientId) {
|
||||
List<IResource> retVal=new ArrayList<IResource>();
|
||||
|
||||
// populate this with resources of any type that are a part of the
|
||||
// "Condition" compartment for the Patient with ID "thePatientId"
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
// .. also include other Patient operations ..
|
||||
}
|
||||
//END SNIPPET: searchCompartment
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ patient.getManagingOrganization().setResource(patient);]]></source>
|
|||
</p>
|
||||
<source><![CDATA[Organization org = new Organization();
|
||||
// org.setId("Organization/65546");
|
||||
org.getName().setValue("Contained Test Organization");
|
||||
org.getName().setValue("Normal (not contained) Test Organization");
|
||||
|
||||
Patient patient = new Patient();
|
||||
patient.setId("Patient/1333");
|
||||
|
|
|
@ -1512,7 +1512,7 @@
|
|||
<p>
|
||||
Example URL to invoke this method:
|
||||
<br />
|
||||
<code>http://fhir.example.com/Patient/123/fooCompartment</code>
|
||||
<code>http://fhir.example.com/Patient/123/Condition</code>
|
||||
</p>
|
||||
|
||||
</section>
|
||||
|
|
|
@ -19,7 +19,17 @@
|
|||
<p>
|
||||
The RESTful server provides a powerful mechanism for adding cross-cutting behaviour
|
||||
to each incoming request that it processes. This mechanism consists of defining one or
|
||||
more <b>interceptors</b> that will
|
||||
more <b>interceptors</b> that will be invoked at defined points in the processing of
|
||||
each incoming request.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Interceptors will intercept the incoming request, and can take action such as
|
||||
logging or auditing it, or examining/injecting headers. They can optionally choose
|
||||
to handle the request themself and the cancel any subsequent processing. Interceptors
|
||||
may also be notified of responses prior to those responses being served to a client,
|
||||
and may audit or even cancel response. The diagram on the right shows the
|
||||
lifecycle of a normal (non failing) request which is subject to an interceptor.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@ -84,7 +94,8 @@
|
|||
<section name="Built In Interceptors">
|
||||
|
||||
<p>
|
||||
HAPI also provides built-in interceptors which may be useful.
|
||||
HAPI also provides built-in interceptors which may be useful. Links to the code for each interceptor
|
||||
is also provided, to give examples of how interceptors are written.
|
||||
</p>
|
||||
|
||||
<a name="Logging"/>
|
||||
|
@ -93,6 +104,7 @@
|
|||
<p>
|
||||
The
|
||||
<a href="./apidocs/ca/uhn/fhir/rest/server/interceptor/LoggingInterceptor.html">LoggingInterceptor</a>
|
||||
(<a href="./xref/ca/uhn/fhir/rest/server/interceptor/LoggingInterceptor.html">code</a>)
|
||||
can be used to generate a new log line (via SLF4j) for each incoming request. LoggingInterceptor
|
||||
provides a flexible message format that can be used to provide a customized level
|
||||
of detail about each incoming request.
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
The
|
||||
IdDt
|
||||
class, which is used to represent resource IDs has been vastly
|
||||
improved so that I can store any form of ID, including a simple alphanumeric
|
||||
improved so that they can store any form of ID, including a simple alphanumeric
|
||||
ID (1234), a relative ID (Patient/1234), a fully qualified ID (http://foo/Patient/1234) or
|
||||
even a version specific ID (Patient/1234/_history/2). As a result, a number
|
||||
of version specific fields/methods have been deprocated. In general, if you
|
||||
|
|
Loading…
Reference in New Issue