-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/IBM/FHIR into main
- Loading branch information
Showing
14 changed files
with
381 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# $member-match operation demo | ||
The contents in this module are from HL7 FHIR® Da Vinci Health Record Exchange (HRex) 0.2.0 - STU R1 - 2nd ballot. The [$member-match](http://build.fhir.org/ig/HL7/davinci-ehrx/OperationDefinition-member-match.html) operation is used to demonstrate that a custom strategy can and is used. | ||
|
||
You must install the fhir-operation-member-match jar in the userlib (hrex, us-core as well). | ||
|
||
``` | ||
mvn clean install -DskipTests | ||
``` |
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,61 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.ibm.fhir</groupId> | ||
<artifactId>fhir-parent</artifactId> | ||
<version>4.10.0-SNAPSHOT</version> | ||
<relativePath>../../fhir-parent</relativePath> | ||
</parent> | ||
<artifactId>fhir-operation-member-match-demo</artifactId> | ||
<dependencies> | ||
<dependency> | ||
<groupId>jakarta.ws.rs</groupId> | ||
<artifactId>jakarta.ws.rs-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>fhir-server-spi</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>fhir-server</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>fhir-model</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>fhir-registry</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>fhir-ig-us-core</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>fhir-ig-davinci-hrex</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.ibm.fhir</groupId> | ||
<artifactId>fhir-operation-member-match</artifactId> | ||
<version>4.10.0-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
45 changes: 45 additions & 0 deletions
45
...mo/src/main/java/demo/ibm/fhir/operation/davinci/hrex/provider/strategy/DemoStrategy.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 @@ | ||
/* | ||
* (C) Copyright IBM Corp. 2021 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package demo.ibm.fhir.operation.davinci.hrex.provider.strategy; | ||
|
||
import java.util.logging.Logger; | ||
|
||
import com.ibm.fhir.config.PropertyGroup; | ||
import com.ibm.fhir.exception.FHIROperationException; | ||
import com.ibm.fhir.model.resource.Parameters; | ||
import com.ibm.fhir.operation.davinci.hrex.configuration.ConfigurationFactory; | ||
import com.ibm.fhir.operation.davinci.hrex.provider.strategy.DefaultMemberMatchStrategy; | ||
import com.ibm.fhir.operation.davinci.hrex.provider.strategy.MemberMatchResult; | ||
|
||
/** | ||
* Used to Demonstrate a custom Strategy | ||
*/ | ||
public class DemoStrategy extends DefaultMemberMatchStrategy { | ||
|
||
private static final Logger LOG = Logger.getLogger(DemoStrategy.class.getSimpleName()); | ||
|
||
@Override | ||
public String getMemberMatchIdentifier() { | ||
return "demo"; | ||
} | ||
|
||
@Override | ||
public void validate(Parameters input) throws FHIROperationException { | ||
LOG.info("Validating Content for strategy - " + this.getMemberMatchIdentifier()); | ||
super.validate(input); | ||
} | ||
|
||
@Override | ||
public MemberMatchResult executeMemberMatch() throws FHIROperationException { | ||
LOG.info("executeMemberMatch for strategy - " + this.getMemberMatchIdentifier()); | ||
PropertyGroup group = ConfigurationFactory.factory().getConfigurationAdapter().getExtendedStrategyPropertyGroup(); | ||
if (group != null) { | ||
LOG.info("executeMemberMatch Extend Strategy Config is " + group.getJsonObj()); | ||
} | ||
return super.executeMemberMatch(); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...TA-INF/services/com.ibm.fhir.operation.davinci.hrex.provider.strategy.MemberMatchStrategy
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 @@ | ||
demo.ibm.fhir.operation.davinci.hrex.provider.strategy.DemoStrategy |
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
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,8 @@ | ||
# $member-match operation demo | ||
The contents in this module are from HL7 FHIR® Da Vinci Health Record Exchange (HRex) 0.2.0 - STU R1 - 2nd ballot. The [$member-match](http://build.fhir.org/ig/HL7/davinci-ehrx/OperationDefinition-member-match.html) operation is used to demonstrate that a custom strategy can and is used. | ||
|
||
You must install the fhir-operation-member-match jar in the userlib (hrex, us-core as well). | ||
|
||
``` | ||
mvn clean install -DskipTests | ||
``` |
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,61 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.ibm.fhir</groupId> | ||
<artifactId>fhir-parent</artifactId> | ||
<version>4.10.0-SNAPSHOT</version> | ||
<relativePath>../../fhir-parent</relativePath> | ||
</parent> | ||
<artifactId>fhir-operation-member-match-demo</artifactId> | ||
<dependencies> | ||
<dependency> | ||
<groupId>jakarta.ws.rs</groupId> | ||
<artifactId>jakarta.ws.rs-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>fhir-server-spi</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>fhir-server</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>fhir-model</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>fhir-registry</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>fhir-ig-us-core</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>fhir-ig-davinci-hrex</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.ibm.fhir</groupId> | ||
<artifactId>fhir-operation-member-match</artifactId> | ||
<version>4.10.0-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
Oops, something went wrong.