-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#201:modify author parameters in MHD query transactions in order to f…
…ix the capability statement
- Loading branch information
Showing
8 changed files
with
161 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...d/src/test/java/org/openehealth/ipf/commons/ihe/fhir/iti66/Iti66SearchParametersTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright 2018 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.openehealth.ipf.commons.ihe.fhir.iti66; | ||
|
||
import ca.uhn.fhir.rest.param.ReferenceAndListParam; | ||
import ca.uhn.fhir.rest.param.ReferenceOrListParam; | ||
import ca.uhn.fhir.rest.param.ReferenceParam; | ||
import org.hl7.fhir.dstu3.model.Practitioner; | ||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
/** | ||
* @author Christian Ohr | ||
*/ | ||
public class Iti66SearchParametersTest { | ||
|
||
@Test | ||
public void setAuthor() { | ||
Iti66SearchParameters searchParameters = Iti66SearchParameters.builder().build(); | ||
|
||
ReferenceAndListParam param = new ReferenceAndListParam() | ||
.addAnd(new ReferenceOrListParam() | ||
.addOr(new ReferenceParam(Practitioner.SP_FAMILY, "family"))) | ||
.addAnd(new ReferenceOrListParam() | ||
.addOr(new ReferenceParam(Practitioner.SP_GIVEN, "given"))); | ||
searchParameters.setAuthor(param); | ||
assertEquals("family", searchParameters.getAuthorFamilyName().getValue()); | ||
assertEquals("given", searchParameters.getAuthorGivenName().getValue()); | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
...d/src/test/java/org/openehealth/ipf/commons/ihe/fhir/iti67/Iti67SearchParametersTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright 2018 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.openehealth.ipf.commons.ihe.fhir.iti67; | ||
|
||
import ca.uhn.fhir.rest.param.ReferenceAndListParam; | ||
import ca.uhn.fhir.rest.param.ReferenceOrListParam; | ||
import ca.uhn.fhir.rest.param.ReferenceParam; | ||
import org.hl7.fhir.dstu3.model.Practitioner; | ||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
/** | ||
* @author Christian Ohr | ||
*/ | ||
public class Iti67SearchParametersTest { | ||
|
||
@Test | ||
public void setAuthor() { | ||
Iti67SearchParameters searchParameters = Iti67SearchParameters.builder().build(); | ||
|
||
ReferenceAndListParam param = new ReferenceAndListParam() | ||
.addAnd(new ReferenceOrListParam() | ||
.addOr(new ReferenceParam(Practitioner.SP_FAMILY, "family"))) | ||
.addAnd(new ReferenceOrListParam() | ||
.addOr(new ReferenceParam(Practitioner.SP_GIVEN, "given"))); | ||
searchParameters.setAuthor(param); | ||
assertEquals("family", searchParameters.getAuthorFamilyName().getValue()); | ||
assertEquals("given", searchParameters.getAuthorGivenName().getValue()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Configuration> | ||
<Appenders> | ||
<Console name="CONSOLE" target="SYSTEM_OUT" follow="true"> | ||
<PatternLayout charset="UTF-8"> | ||
<Pattern>%d{ABSOLUTE} [%t] %-5p - %C{1}.%M(%L) | %m%n</Pattern> | ||
</PatternLayout> | ||
</Console> | ||
</Appenders> | ||
|
||
<Loggers> | ||
<Root level="WARN"> | ||
<AppenderRef ref="CONSOLE"/> | ||
</Root> | ||
</Loggers> | ||
</Configuration> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters