This commit is contained in:
lmds1 2014-11-04 17:32:00 -05:00
commit f303e174fc
3 changed files with 47 additions and 15 deletions

View File

@ -39,21 +39,19 @@ public abstract class BaseOperationOutcome extends BaseResource implements IReso
public abstract BaseIssue getIssueFirstRep();
public static abstract class BaseIssue extends BaseIdentifiableElement implements IResourceBlock {
public abstract CodeDt getSeverityElement();
public abstract StringDt getDetailsElement();
public abstract BaseCodingDt getType();
public abstract BaseIssue addLocation( String theString);
public abstract BaseIssue addLocation(String theString);
public abstract BaseIssue setDetails(String theString);
public abstract StringDt getLocationFirstRep();
}
}

View File

@ -507,7 +507,7 @@ public class ClientTest {
@Test
public void testHistoryWithParams() throws Exception {
//@formatter:off
final String msg = "<feed xmlns=\"http://www.w3.org/2005/Atom\"><title/><id>6c1d93be-027f-468d-9d47-f826cd15cf42</id><link rel=\"self\" href=\"http://localhost:51698/Patient/222/_history\"/><link rel=\"fhir-base\" href=\"http://localhost:51698\"/><os:totalResults xmlns:os=\"http://a9.com/-/spec/opensearch/1.1/\">2</os:totalResults><published>2014-04-13T18:24:50-04:00</published><author><name>ca.uhn.fhir.rest.method.HistoryMethodBinding</name></author><entry><title>Patient 222</title><id>222</id><updated>1969-12-31T19:00:20.000-05:00</updated><published>1969-12-31T19:00:10.000-05:00</published><link rel=\"self\" href=\"http://localhost:51698/Patient/222/_history/1\"/><content type=\"text/xml\"><Patient xmlns=\"http://hl7.org/fhir\"><identifier><use value=\"official\"/><system value=\"urn:hapitest:mrns\"/><value value=\"00001\"/></identifier><name><family value=\"OlderFamily\"/><given value=\"PatientOne\"/></name><gender><text value=\"M\"/></gender></Patient></content></entry><entry><title>Patient 222</title><id>222</id><updated>1969-12-31T19:00:30.000-05:00</updated><published>1969-12-31T19:00:10.000-05:00</published><link rel=\"self\" href=\"http://localhost:51698/Patient/222/_history/2\"/><content type=\"text/xml\"><Patient xmlns=\"http://hl7.org/fhir\"><identifier><use value=\"official\"/><system value=\"urn:hapitest:mrns\"/><value value=\"00001\"/></identifier><name><family value=\"NewerFamily\"/><given value=\"PatientOne\"/></name><gender><text value=\"M\"/></gender></Patient></content></entry></feed>";
//@formatter:on
@ -525,17 +525,16 @@ public class ClientTest {
ITestClient client = ctx.newRestfulClient(ITestClient.class, "http://foo");
client.getHistoryPatientInstance(new IdDt("111"), new InstantDt("2012-01-02T00:01:02"), new IntegerDt(12));
// ensures the local timezone
String expectedDateString = new InstantDt(new InstantDt("2012-01-02T12:01:02").getValue()).getValueAsString();
expectedDateString = expectedDateString.replace(":", "%3A").replace("+", "%2B");
client.getHistoryPatientInstance(new IdDt("111"), new InstantDt("2012-01-02T12:01:02"), new IntegerDt(12));
assertThat(capt.getAllValues().get(0).getURI().toString(), containsString("http://foo/Patient/111/_history?"));
assertThat(capt.getAllValues().get(0).getURI().toString(), containsString("_since=2012-01-02T00%3A01%3A02"));
assertThat(capt.getAllValues().get(0).getURI().toString(), containsString("_since="+expectedDateString.replaceAll("\\..*", "")));
assertThat(capt.getAllValues().get(0).getURI().toString(), containsString("_count=12"));
String expectedDateString = new InstantDt(new InstantDt("2012-01-02T00:01:02").getValue()).getValueAsString(); // ensures
// the
// local
// timezone
expectedDateString = expectedDateString.replace(":", "%3A");
client.getHistoryPatientInstance(new IdDt("111"), new InstantDt("2012-01-02T00:01:02").getValue(), new IntegerDt(12).getValue());
client.getHistoryPatientInstance(new IdDt("111"), new InstantDt("2012-01-02T12:01:02").getValue(), new IntegerDt(12).getValue());
assertThat(capt.getAllValues().get(1).getURI().toString(), containsString("http://foo/Patient/111/_history?"));
assertThat(capt.getAllValues().get(1).getURI().toString(), containsString("_since="+expectedDateString));
assertThat(capt.getAllValues().get(1).getURI().toString(), containsString("_count=12"));

View File

@ -13,6 +13,41 @@
<macro name="toc">
</macro>
<p>
<b>This section is still incomplete: </b> Note that HAPI 0.8 has not
yet been released. This section provides details about how to use the
latest SNAPSHOT release, but it will continue to be enhanced as we move towards
the final 0.8 release.
</p>
<subsection name="Importing Resources">
<p>
Beginning in HAPI-FHIR 0.8, the main distribution has been split from one
JAR to a set of JAR files. You will need at least two to use HAPI:
</p>
<ul>
<li>
The <code>hapi-fhir-base-[version].jar</code> file containing the core library.
</li>
<li>
The <code>hapi-fhir-structures-dstu-[version].jar</code> file containing the FHIR model classes
for DSTU1 (all contents of this JAR were previously found in hapi-fhir-base).
</li>
<li>
<i>Optionally: </i>You may also choose to include the
<code>hapi-fhir-structures-dev-[version].jar</code>. This JAR contains structures for the
latest DEV version of FHIR. You may create a client/server which supports either DSTU1 or DEV
resources, or both depending on your needs. Note that using DEV resources may introduce
incompatibilities with other frameworks however.<br/><br/>
<b>You must also include hapi-fhir-structures-dstu-[version].jar</b> if you include
the dev structures JAR at this time. Hopefully at some point soon this requirement
will be relaxed.
</li>
</ul>
</subsection>
<subsection name="Tinder Plugin">
<p>