-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #200 - Expose ruler version via CapabilityStatement
- Loading branch information
Showing
6 changed files
with
83 additions
and
4 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
dstu3/src/main/java/org/opencds/cqf/dstu3/providers/CqfRulerJpaConformanceProviderDstu3.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,36 @@ | ||
package org.opencds.cqf.dstu3.providers; | ||
|
||
import ca.uhn.fhir.jpa.api.config.DaoConfig; | ||
import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao; | ||
import ca.uhn.fhir.jpa.provider.dstu3.JpaConformanceProviderDstu3; | ||
import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; | ||
import ca.uhn.fhir.rest.annotation.Metadata; | ||
import ca.uhn.fhir.rest.api.server.RequestDetails; | ||
import ca.uhn.fhir.rest.server.RestfulServer; | ||
import org.hl7.fhir.dstu3.model.*; | ||
import org.opencds.cqf.dstu3.servlet.BaseServlet; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
|
||
public class CqfRulerJpaConformanceProviderDstu3 extends JpaConformanceProviderDstu3 { | ||
|
||
public CqfRulerJpaConformanceProviderDstu3(RestfulServer theRestfulServer, IFhirSystemDao<Bundle, Meta> theSystemDao, DaoConfig theDaoConfig, ISearchParamRegistry theSearchParamRegistry) { | ||
super(theRestfulServer, theSystemDao, theDaoConfig, theSearchParamRegistry); | ||
} | ||
|
||
@Metadata | ||
@Override | ||
public CapabilityStatement getServerConformance(HttpServletRequest theRequest, RequestDetails theRequestDetails) { | ||
CapabilityStatement retVal; | ||
retVal = super.getServerConformance(theRequest, theRequestDetails); | ||
|
||
Extension softwareModuleExtension = new Extension().setUrl("http://hl7.org/fhir/StructureDefinition/capabilitystatement-softwareModule"); | ||
Extension softwareModuleNameExtension = new Extension().setUrl("name").setValue(new StringType("CQF Ruler FHIR DSTU3 Server")); | ||
Extension softwareModuleVersionExtension = new Extension().setUrl("version").setValue(new StringType(BaseServlet.class.getPackage().getImplementationVersion())); | ||
softwareModuleExtension.addExtension(softwareModuleNameExtension); | ||
softwareModuleExtension.addExtension(softwareModuleVersionExtension); | ||
retVal.getSoftware().addExtension(softwareModuleExtension); | ||
|
||
return retVal; | ||
} | ||
} |
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
41 changes: 41 additions & 0 deletions
41
r4/src/main/java/org/opencds/cqf/r4/providers/CqfRulerJpaConformanceProviderR4.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,41 @@ | ||
package org.opencds.cqf.r4.providers; | ||
|
||
import ca.uhn.fhir.jpa.api.config.DaoConfig; | ||
import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao; | ||
import ca.uhn.fhir.jpa.provider.r4.JpaConformanceProviderR4; | ||
import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry; | ||
import ca.uhn.fhir.rest.annotation.Metadata; | ||
import ca.uhn.fhir.rest.api.server.RequestDetails; | ||
import ca.uhn.fhir.rest.server.RestfulServer; | ||
import org.hl7.fhir.r4.model.Extension; | ||
import org.hl7.fhir.r4.model.StringType; | ||
import org.hl7.fhir.r4.model.Bundle; | ||
import org.hl7.fhir.r4.model.CapabilityStatement; | ||
import org.hl7.fhir.r4.model.Meta; | ||
import org.opencds.cqf.r4.servlet.BaseServlet; | ||
|
||
|
||
import javax.servlet.http.HttpServletRequest; | ||
|
||
public class CqfRulerJpaConformanceProviderR4 extends JpaConformanceProviderR4 { | ||
|
||
public CqfRulerJpaConformanceProviderR4(RestfulServer theRestfulServer, IFhirSystemDao<Bundle, Meta> theSystemDao, DaoConfig theDaoConfig, ISearchParamRegistry theSearchParamRegistry) { | ||
super(theRestfulServer, theSystemDao, theDaoConfig, theSearchParamRegistry); | ||
} | ||
|
||
@Metadata | ||
@Override | ||
public CapabilityStatement getServerConformance(HttpServletRequest theRequest, RequestDetails theRequestDetails) { | ||
CapabilityStatement retVal; | ||
retVal = super.getServerConformance(theRequest, theRequestDetails); | ||
|
||
Extension softwareModuleExtension = new Extension().setUrl("http://hl7.org/fhir/StructureDefinition/capabilitystatement-softwareModule"); | ||
Extension softwareModuleNameExtension = new Extension().setUrl("name").setValue(new StringType("CQF Ruler FHIR R4 Server")); | ||
Extension softwareModuleVersionExtension = new Extension().setUrl("version").setValue(new StringType(BaseServlet.class.getPackage().getImplementationVersion())); | ||
softwareModuleExtension.addExtension(softwareModuleNameExtension); | ||
softwareModuleExtension.addExtension(softwareModuleVersionExtension); | ||
retVal.getSoftware().addExtension(softwareModuleExtension); | ||
|
||
return retVal; | ||
} | ||
} |
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