From b3cd3a17604666d751479647e5659f2dd330f36d Mon Sep 17 00:00:00 2001 From: Mason Watson Date: Mon, 22 Apr 2024 14:41:52 -0700 Subject: [PATCH 1/2] rm svc-lighthouse-api --- .github/workflows/continuous-delivery.yml | 7 - .github/workflows/delete-published-images.yml | 1 - .github/workflows/secrel.yml | 1 - .github/workflows/update-deployment.yml | 1 - app/docker-compose.yml | 12 - helm/svc-lighthouse-api/Chart.yaml | 14 - .../templates/deployment.yaml | 37 - .../templates/named_templates | 1 - helm/svc-lighthouse-api/values.yaml | 41 - scripts/image-names.sh | 2 +- settings.gradle | 1 - svc-lighthouse-api/.gitignore | 60 - svc-lighthouse-api/README.md | 29 - svc-lighthouse-api/build.gradle | 35 - svc-lighthouse-api/gradle.properties | 4 - .../va/vro/abddataaccess/AbdApplication.java | 11 - .../vro/abddataaccess/config/AppConfig.java | 31 - .../abddataaccess/config/AppProperties.java | 21 - .../abddataaccess/config/RabbitMqConfig.java | 43 - .../properties/LighthouseProperties.java | 25 - .../config/properties/RabbitMqProperties.java | 13 - .../abddataaccess/exception/AbdException.java | 26 - .../abddataaccess/model/AbdBloodPressure.java | 67 -- .../abddataaccess/model/AbdBpMeasurement.java | 27 - .../va/vro/abddataaccess/model/AbdClaim.java | 16 - .../vro/abddataaccess/model/AbdCondition.java | 52 - .../vro/abddataaccess/model/AbdEvidence.java | 35 - .../model/AbdEvidenceWithSummary.java | 34 - .../abddataaccess/model/AbdMedication.java | 85 -- .../vro/abddataaccess/model/AbdProcedure.java | 30 - .../vro/abddataaccess/model/AbdResponse.java | 60 - .../model/HealthAssessmentSource.java | 6 - .../model/HealthDataAssessment.java | 41 - .../model/LighthouseTokenMessage.java | 25 - .../abddataaccess/model/ServiceLocation.java | 31 - .../vro/abddataaccess/service/AbdDomain.java | 22 - .../service/AbdRabbitReceiver.java | 34 - .../vro/abddataaccess/service/FhirClient.java | 393 ------- .../abddataaccess/service/FieldExtractor.java | 352 ------ .../service/LighthouseApiService.java | 173 --- .../resources/application-end2end-test.yaml | 8 - .../main/resources/application-nonprod.yaml | 14 - .../main/resources/application-prod-test.yaml | 13 - .../src/main/resources/application-prod.yaml | 13 - .../src/main/resources/application.yaml | 68 -- .../vro/abddataaccess/AppPropertiesTests.java | 24 - .../gov/va/vro/abddataaccess/CommonData.java | 7 - .../exception/AbdExceptionTest.java | 27 - .../abddataaccess/model/AbdResponseTest.java | 87 -- .../abddataaccess/service/FhirClientTest.java | 241 ---- .../service/FieldExtractorTest.java | 253 ---- .../service/LighthouseApiServiceTest.java | 97 -- .../src/test/resources/application-test.yaml | 32 - .../bloodpresure-measurement-test.json | 239 ---- .../resources/condition-response-bundle.json | 1026 ----------------- .../src/test/resources/empty-bundle.json | 20 - .../expected-json/lh-patient01-7101.json | 325 ------ .../src/test/resources/lighthouseToken.json | 8 - .../resources/medication-response-bundle.json | 497 -------- .../observation-response-bundle.json | 441 ------- .../resources/procedure-response-bundle.json | 715 ------------ 61 files changed, 1 insertion(+), 6053 deletions(-) delete mode 100644 helm/svc-lighthouse-api/Chart.yaml delete mode 100644 helm/svc-lighthouse-api/templates/deployment.yaml delete mode 120000 helm/svc-lighthouse-api/templates/named_templates delete mode 100644 helm/svc-lighthouse-api/values.yaml delete mode 100644 svc-lighthouse-api/.gitignore delete mode 100644 svc-lighthouse-api/README.md delete mode 100644 svc-lighthouse-api/build.gradle delete mode 100644 svc-lighthouse-api/gradle.properties delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/AbdApplication.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/AppConfig.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/AppProperties.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/RabbitMqConfig.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/properties/LighthouseProperties.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/properties/RabbitMqProperties.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/exception/AbdException.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdBloodPressure.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdBpMeasurement.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdClaim.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdCondition.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdEvidence.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdEvidenceWithSummary.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdMedication.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdProcedure.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdResponse.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/HealthAssessmentSource.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/HealthDataAssessment.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/LighthouseTokenMessage.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/ServiceLocation.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/AbdDomain.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/AbdRabbitReceiver.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/FhirClient.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/FieldExtractor.java delete mode 100644 svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/LighthouseApiService.java delete mode 100644 svc-lighthouse-api/src/main/resources/application-end2end-test.yaml delete mode 100644 svc-lighthouse-api/src/main/resources/application-nonprod.yaml delete mode 100644 svc-lighthouse-api/src/main/resources/application-prod-test.yaml delete mode 100644 svc-lighthouse-api/src/main/resources/application-prod.yaml delete mode 100644 svc-lighthouse-api/src/main/resources/application.yaml delete mode 100644 svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/AppPropertiesTests.java delete mode 100644 svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/CommonData.java delete mode 100644 svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/exception/AbdExceptionTest.java delete mode 100644 svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/model/AbdResponseTest.java delete mode 100644 svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/service/FhirClientTest.java delete mode 100644 svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/service/FieldExtractorTest.java delete mode 100644 svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/service/LighthouseApiServiceTest.java delete mode 100644 svc-lighthouse-api/src/test/resources/application-test.yaml delete mode 100644 svc-lighthouse-api/src/test/resources/bloodpresure-measurement-test.json delete mode 100644 svc-lighthouse-api/src/test/resources/condition-response-bundle.json delete mode 100644 svc-lighthouse-api/src/test/resources/empty-bundle.json delete mode 100644 svc-lighthouse-api/src/test/resources/expected-json/lh-patient01-7101.json delete mode 100644 svc-lighthouse-api/src/test/resources/lighthouseToken.json delete mode 100644 svc-lighthouse-api/src/test/resources/medication-response-bundle.json delete mode 100644 svc-lighthouse-api/src/test/resources/observation-response-bundle.json delete mode 100644 svc-lighthouse-api/src/test/resources/procedure-response-bundle.json diff --git a/.github/workflows/continuous-delivery.yml b/.github/workflows/continuous-delivery.yml index e5d1d5ca24..8a871bc65a 100644 --- a/.github/workflows/continuous-delivery.yml +++ b/.github/workflows/continuous-delivery.yml @@ -43,13 +43,6 @@ jobs: target_env: ${{ inputs.target_env || 'dev' }} helm_chart: svc-bgs-api image_tag: ${{ inputs.image_tag || 'latest' }} - deploy-vro-svc-lighthouse-api: - uses: ./.github/workflows/update-deployment.yml - secrets: inherit - with: - target_env: ${{ inputs.target_env || 'dev' }} - helm_chart: svc-lighthouse-api - image_tag: ${{ inputs.image_tag || 'latest' }} deploy-domain-cc: uses: ./.github/workflows/update-deployment.yml secrets: inherit diff --git a/.github/workflows/delete-published-images.yml b/.github/workflows/delete-published-images.yml index 189aa4747f..546efcdbf7 100644 --- a/.github/workflows/delete-published-images.yml +++ b/.github/workflows/delete-published-images.yml @@ -72,7 +72,6 @@ jobs: - vro-app - vro-db-init - vro-svc-bgs-api - - vro-svc-lighthouse-api - vro-svc-bie-kafka - vro-xample-workflows - vro-cc-app diff --git a/.github/workflows/secrel.yml b/.github/workflows/secrel.yml index 3fb3672cb5..882d5928d9 100644 --- a/.github/workflows/secrel.yml +++ b/.github/workflows/secrel.yml @@ -40,7 +40,6 @@ on: - svc-bgs-api - svc-bie-kafka - svc-bip-api - - svc-lighthouse-api - api-gateway - ee-max-cfi-app - ee-ep-merge-app diff --git a/.github/workflows/update-deployment.yml b/.github/workflows/update-deployment.yml index 765f0efdfb..92f5e31f8d 100644 --- a/.github/workflows/update-deployment.yml +++ b/.github/workflows/update-deployment.yml @@ -26,7 +26,6 @@ on: - svc-bgs-api - svc-bie-kafka - svc-bip-api - - svc-lighthouse-api - api-gateway - domain-ee-max-cfi-app - domain-ee-ep-merge-app diff --git a/app/docker-compose.yml b/app/docker-compose.yml index e0542660fb..bdcb402247 100644 --- a/app/docker-compose.yml +++ b/app/docker-compose.yml @@ -72,18 +72,6 @@ services: networks: - vro_intranet - svc-lighthouse-api: - profiles: ["all","svc","lh"] - image: va/abd_vro-svc-lighthouse-api:latest - <<: [*common-sde-security, *common-security-opt] - environment: - # ENV=local causes application-local.properties to be used, in addition to the default application.properties - <<: [*rabbitmq-placeholder-vars, *common-vars] - LH_PRIVATE_KEY: ${LH_PRIVATE_KEY} - LH_ACCESS_CLIENT_ID: ${LH_ACCESS_CLIENT_ID} - networks: - - vro_intranet - svc-bip-api: profiles: ["all", "svc", "bip"] image: va/abd_vro-svc-bip-api:latest diff --git a/helm/svc-lighthouse-api/Chart.yaml b/helm/svc-lighthouse-api/Chart.yaml deleted file mode 100644 index 457eb03317..0000000000 --- a/helm/svc-lighthouse-api/Chart.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# https://helm.sh/docs/topics/charts/ - -apiVersion: v2 -type: application - -# numbers, lowercase, and dashes only -# https://helm.sh/docs/chart_best_practices/conventions/#chart-names -name: vro-svc-lh-api-chart -description: VRO microservice - client for Lighthouse API - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# TODO discuss: How can we enforce or automate incrementing this? -version: 0.1.4 diff --git a/helm/svc-lighthouse-api/templates/deployment.yaml b/helm/svc-lighthouse-api/templates/deployment.yaml deleted file mode 100644 index e5a0387ca1..0000000000 --- a/helm/svc-lighthouse-api/templates/deployment.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: vro-svc-lighthouse-api - labels: {{- toYaml .Values.labels | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: # must match the pod template's labels - {{- toYaml .Values.labels | nindent 6 }} - template: - metadata: - labels: - sidecar.istio.io/inject: "false" - {{- toYaml .Values.labels | nindent 8 }} - annotations: - {{- include "vro.annotations.pod" . | nindent 8 }} - {{- include "vro.annotations.reloadLatest" . | nindent 8 }} - spec: - {{- include "vro.imagePullSecrets" . | nindent 6 }} - containers: - - name: svc-lighthouse-api{{ include "vro.containerSuffix" . }} - image: {{ include "vro.imageRegistryPath" . }}vro-svc-lighthouse-api:{{ include "vro.imageTag" . }} - ports: {{- toYaml .Values.ports | nindent 12 }} - livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} - readinessProbe: {{- toYaml .Values.readinessProbe | nindent 12 }} - env: - {{- include "vro.commonEnvVars" . | nindent 12 }} - {{- include "vro.mqClient.envVars" . | nindent 12 }} - # VRO_SECRETS_LH provides LH_ACCESS_CLIENT_ID and LH_PRIVATE_KEY - - name: VRO_SECRETS_LH - valueFrom: - secretKeyRef: - name: vro-secrets-lh - key: VRO_SECRETS_LH - resources: - {{- toYaml .Values.resources | nindent 12 }} diff --git a/helm/svc-lighthouse-api/templates/named_templates b/helm/svc-lighthouse-api/templates/named_templates deleted file mode 120000 index d04b33af4a..0000000000 --- a/helm/svc-lighthouse-api/templates/named_templates +++ /dev/null @@ -1 +0,0 @@ -../../_shared/named_templates \ No newline at end of file diff --git a/helm/svc-lighthouse-api/values.yaml b/helm/svc-lighthouse-api/values.yaml deleted file mode 100644 index 3576841a8e..0000000000 --- a/helm/svc-lighthouse-api/values.yaml +++ /dev/null @@ -1,41 +0,0 @@ -labels: - app: vro-svc-lighthouse-api - -resources: - requests: - cpu: 150m - memory: 512Mi - limits: - cpu: 1000m - memory: 1024Mi - -replicaCount: 1 - -ports: - - name: liveness - containerPort: 10101 - protocol: TCP - -livenessProbe: - httpGet: - path: /actuator/health/liveness - port: 10101 - initialDelaySeconds: 120 - periodSeconds: 10 - timeoutSeconds: 10 - failureThreshold: 3 - -readinessProbe: - httpGet: - path: /actuator/health/readiness - port: 10101 - initialDelaySeconds: 120 - periodSeconds: 10 - timeoutSeconds: 10 - failureThreshold: 3 - -# autoscaling: -# enabled: false -# minReplicas: 1 -# maxReplicas: 100 -# targetCPUUtilizationPercentage: 80 diff --git a/scripts/image-names.sh b/scripts/image-names.sh index 12aa71d9c8..38d8d04295 100755 --- a/scripts/image-names.sh +++ b/scripts/image-names.sh @@ -28,7 +28,7 @@ IMAGES=( postgres \ api-gateway app db-init \ dev-tools \ svc-bgs-api \ - svc-lighthouse-api svc-bie-kafka svc-bip-api \ + svc-bie-kafka svc-bip-api \ xample-workflows \ cc-app \ ee-max-cfi-app \ diff --git a/settings.gradle b/settings.gradle index 29a3e21364..071ffdfd6e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -41,7 +41,6 @@ include ':shared:lib-bie-kafka' include ':shared:lib-camel-connector' include ':svc-bgs-api' include ':svc-bip-api' -include ':svc-lighthouse-api' include ':svc-bie-kafka' include ':domain-xample:xample-api-controller' diff --git a/svc-lighthouse-api/.gitignore b/svc-lighthouse-api/.gitignore deleted file mode 100644 index 04d9a2da87..0000000000 --- a/svc-lighthouse-api/.gitignore +++ /dev/null @@ -1,60 +0,0 @@ -# Compiled class file -*.class - -# Log file -*.log - -# BlueJ files -*.ctxt - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.nar -*.ear -*.zip -*.tar.gz -*.rar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ - -### VS Code ### -.vscode/ - -### Mac artifacts ### -.DS_Store diff --git a/svc-lighthouse-api/README.md b/svc-lighthouse-api/README.md deleted file mode 100644 index 93bc4763af..0000000000 --- a/svc-lighthouse-api/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Automated Benefit Delivery (ABD) Data Access Service - -This service -- Listens RabbitMQ queue where claims are submitted -- Gets health data from Lighthouse Health API for the patient and diagnostic code specied in claim -- Returns health to Camel route - -# Technologies - -- [Java](https://www.java.com/en/) -- [Spring Boot](https://spring.io/projects/spring-boot) -- [Gradle](https://gradle.org) -- [Testcontainers](https://www.testcontainers.org/) -- [RabbitMQ](https://www.rabbitmq.com) - -# Local Deployment - -See the parent project for deployment information. - -A `buildgradle.local` is provided if you need to run this independently from the parent project. Replace `build.gradle` with `buildgradle.local` and run the server - -```sh -./gradlew bootRun -``` -you can also run the tests - -```sh -./gradlew test -``` diff --git a/svc-lighthouse-api/build.gradle b/svc-lighthouse-api/build.gradle deleted file mode 100644 index 7728c17d99..0000000000 --- a/svc-lighthouse-api/build.gradle +++ /dev/null @@ -1,35 +0,0 @@ - -plugins { - id 'local.java.container-spring-conventions' - id 'local.std.java.library-conventions' -} - -description = 'Automated Benefit Delivery Data Access Service' - -dependencies { - implementation "com.fasterxml.jackson.core:jackson-databind" - implementation 'org.springframework.boot:spring-boot-starter-amqp' - implementation 'org.springframework.boot:spring-boot-starter-web' - // Provides endpoint for healthcheck - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - def hapi_fhir_version="7.0.2" - implementation "ca.uhn.hapi.fhir:hapi-fhir-base:${hapi_fhir_version}" - implementation "ca.uhn.hapi.fhir:hapi-fhir-server-openapi:${hapi_fhir_version}" - - implementation 'org.bouncycastle:bcprov-jdk18on:1.78.1' - implementation 'org.apache.commons:commons-lang3:3.14.0' - - def jjwt_version="0.12.5" - implementation "io.jsonwebtoken:jjwt-api:${jjwt_version}" - implementation "io.jsonwebtoken:jjwt-impl:${jjwt_version}" - implementation "io.jsonwebtoken:jjwt-jackson:${jjwt_version}" - - implementation 'org.apache.tomcat.embed:tomcat-embed-core:10.1.20' - - testImplementation "org.apache.camel.springboot:camel-spring-rabbitmq-starter:${camel_version}" -} - -test { - useJUnitPlatform() -} diff --git a/svc-lighthouse-api/gradle.properties b/svc-lighthouse-api/gradle.properties deleted file mode 100644 index 14998d4778..0000000000 --- a/svc-lighthouse-api/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -# For port numbering convention, see https://github.com/department-of-veterans-affairs/abd-vro/wiki/Software-Conventions#port-numbers - -healthcheck_port=10101 -spring_boot_version=3.2.3 diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/AbdApplication.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/AbdApplication.java deleted file mode 100644 index ca2d911819..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/AbdApplication.java +++ /dev/null @@ -1,11 +0,0 @@ -package gov.va.vro.abddataaccess; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class AbdApplication { - public static void main(String[] args) { - SpringApplication.run(AbdApplication.class, args); - } -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/AppConfig.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/AppConfig.java deleted file mode 100644 index 05aaa85c50..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/AppConfig.java +++ /dev/null @@ -1,31 +0,0 @@ -package gov.va.vro.abddataaccess.config; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.parser.IParser; -import gov.va.vro.abddataaccess.service.FhirClient; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.client.RestTemplate; - -@Configuration -public class AppConfig { - private final FhirContext fhirContext = FhirContext.forR4(); - - @Autowired private AppProperties properties; - - @Bean - public FhirClient vroFhirClient() { - return new FhirClient(); - } - - @Bean - public IParser jsonFhirParser() { - return fhirContext.newJsonParser(); - } - - @Bean - public RestTemplate getRestTemplate() { - return new RestTemplate(); - } -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/AppProperties.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/AppProperties.java deleted file mode 100644 index 73766f314f..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/AppProperties.java +++ /dev/null @@ -1,21 +0,0 @@ -package gov.va.vro.abddataaccess.config; - -import gov.va.vro.abddataaccess.config.properties.LighthouseProperties; -import gov.va.vro.abddataaccess.config.properties.RabbitMqProperties; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class AppProperties { - @Bean - @ConfigurationProperties(prefix = "abd-data-access.rabbitmq") - public RabbitMqProperties rabbitmq() { - return new RabbitMqProperties(); - } - - @Bean - public LighthouseProperties lighthouseProperties() { - return new LighthouseProperties(); - } -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/RabbitMqConfig.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/RabbitMqConfig.java deleted file mode 100644 index 386063fc38..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/RabbitMqConfig.java +++ /dev/null @@ -1,43 +0,0 @@ -package gov.va.vro.abddataaccess.config; - -import org.springframework.amqp.core.Binding; -import org.springframework.amqp.core.BindingBuilder; -import org.springframework.amqp.core.DirectExchange; -import org.springframework.amqp.core.Queue; -import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter; -import org.springframework.amqp.support.converter.MessageConverter; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class RabbitMqConfig { - @Value("${abd-data-access.rabbitmq.claim-submit-exchange}") - private String claimSubmitExchangeName; - - @Value("${abd-data-access.rabbitmq.claim-submit-queue}") - private String claimSubmitQueueName; - - @Value("${abd-data-access.rabbitmq.claim-submit-routing-key}") - private String claimSubmitRoutingKey; - - @Bean - Queue claimSubmitQueue() { - return new Queue(claimSubmitQueueName, true, false, true); - } - - @Bean - DirectExchange claimSubmitExchange() { - return new DirectExchange(claimSubmitExchangeName, true, true); - } - - @Bean - Binding claimSubmitBinding(Queue queue, DirectExchange exchange) { - return BindingBuilder.bind(queue).to(exchange).with(claimSubmitRoutingKey); - } - - @Bean - MessageConverter jsonMessageConverter() { - return new Jackson2JsonMessageConverter(); - } -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/properties/LighthouseProperties.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/properties/LighthouseProperties.java deleted file mode 100644 index 36401e4f37..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/properties/LighthouseProperties.java +++ /dev/null @@ -1,25 +0,0 @@ -package gov.va.vro.abddataaccess.config.properties; - -import lombok.Getter; -import lombok.Setter; -import org.springframework.boot.context.properties.ConfigurationProperties; - -/** - * Lighthouse FHIR API access setup data. - * - * @author Warren Lin - */ -@Getter -@Setter -@ConfigurationProperties(prefix = "lh") -public class LighthouseProperties { - private String clientId; - private String assertionurl; - private String tokenurl; - private String fhirurl; - private String pemkey; - - // use this date to filter out Lighthouse FHIR resource updated before this date. - // Date string format: yyyy-MM-dd i.e. 2020-01-05 - private String filterLastUpdatedDate; -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/properties/RabbitMqProperties.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/properties/RabbitMqProperties.java deleted file mode 100644 index f6bc1b9bd2..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/config/properties/RabbitMqProperties.java +++ /dev/null @@ -1,13 +0,0 @@ -package gov.va.vro.abddataaccess.config.properties; - -import jakarta.validation.constraints.NotBlank; -import lombok.Getter; -import lombok.Setter; - -@Getter -@Setter -public class RabbitMqProperties { - @NotBlank private String claimSubmitExchange; - - @NotBlank private String claimSubmitQueue; -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/exception/AbdException.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/exception/AbdException.java deleted file mode 100644 index b14af571c5..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/exception/AbdException.java +++ /dev/null @@ -1,26 +0,0 @@ -package gov.va.vro.abddataaccess.exception; - -/** - * ABD Exception. - * - * @author Warren Lin - */ -public class AbdException extends Exception { - private static final String LIGHTHOUSE_ERROR = "ABD error."; - - public AbdException() { - super(LIGHTHOUSE_ERROR); - } - - public AbdException(String msg) { - super(msg); - } - - public AbdException(String message, Throwable cause) { - super(message, cause); - } - - public AbdException(Throwable cause) { - super(LIGHTHOUSE_ERROR, cause); - } -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdBloodPressure.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdBloodPressure.java deleted file mode 100644 index 64f94ad4ff..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdBloodPressure.java +++ /dev/null @@ -1,67 +0,0 @@ -package gov.va.vro.abddataaccess.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import org.apache.commons.lang3.StringUtils; - -@Getter -@Setter -@EqualsAndHashCode(onlyExplicitlyIncluded = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class AbdBloodPressure implements Comparable { - @EqualsAndHashCode.Include - @Schema(description = "The date blood pressure is taken", example = "1999-12-31") - private String date; - - @EqualsAndHashCode.Include - @Schema(description = "Diastolic measurement") - private AbdBpMeasurement diastolic; - - @EqualsAndHashCode.Include - @Schema(description = "Systolic measurement") - private AbdBpMeasurement systolic; - - @Schema( - description = "Name of the physician who took the measurement", - example = "DR. THOMAS REYNOLDS PHD") - private String practitioner; - - @EqualsAndHashCode.Include - @Schema( - description = "Location where the measurement taken", - example = "WASHINGTON VA MEDICAL CENTER") - private String organization; - - @Schema( - description = "Document Type Description", - example = "Medical Treatment Record - Government Facility") - private String document; - - @Schema(description = "VBMS Receipt Date", example = "1999-12-31") - private String receiptDate; - - @Schema(description = "Document Page Number", example = "55") - private String page; - - @Schema(description = "Document Identifier", example = "{BFA4943C-4F56-4AC5-B48F-5FDE469B1226}") - private String documentId; - - @Schema(description = "Formatted date", example = "12/31/1999") - private String dateFormatted; - - @Schema(description = "Source of this data", example = "LH") - private String dataSource = "LH"; - - @Schema(description = "Partial date from OCR", example = "**/**/1988") - private String partialDate; - - @Override - public int compareTo(AbdBloodPressure otherBp) { - return StringUtils.compare(date, otherBp.date); - } -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdBpMeasurement.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdBpMeasurement.java deleted file mode 100644 index 63fe0a8878..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdBpMeasurement.java +++ /dev/null @@ -1,27 +0,0 @@ -package gov.va.vro.abddataaccess.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -import java.math.BigDecimal; - -@Getter -@Setter -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class AbdBpMeasurement { - @Schema(description = "Code for measurement type", example = "8480-6") - private String code; - - @Schema(description = "Display name for measurement type", example = "Systolic blood pressure") - private String display; - - @Schema(description = "Unit for the measurement", example = "mm[Hg]") - private String unit; - - @Schema(description = "Measurement value", example = "110") - private BigDecimal value; -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdClaim.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdClaim.java deleted file mode 100644 index 686bbcedcf..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdClaim.java +++ /dev/null @@ -1,16 +0,0 @@ -package gov.va.vro.abddataaccess.model; - -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - -@AllArgsConstructor -@NoArgsConstructor -@Getter -@Setter -public class AbdClaim { - private String veteranIcn; - private String diagnosticCode; - private String claimSubmissionId; -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdCondition.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdCondition.java deleted file mode 100644 index 7fdf12d875..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdCondition.java +++ /dev/null @@ -1,52 +0,0 @@ -package gov.va.vro.abddataaccess.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import org.apache.commons.lang3.StringUtils; - -@Getter -@Setter -@EqualsAndHashCode(onlyExplicitlyIncluded = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class AbdCondition implements Comparable { - @EqualsAndHashCode.Include private String text; - @EqualsAndHashCode.Include private String code; - private String abatementDate; - @EqualsAndHashCode.Include private String status; - @EqualsAndHashCode.Include private String onsetDate; - private String recordedDate; - private Boolean relevant; - - @Schema(description = "Formatted date", example = "12/31/1999") - private String dateFormatted; - - @Schema(description = "Source of this data", example = "LH") - private String dataSource = "LH"; - - @Schema(description = "Partial date from OCR", example = "**/**/1988") - private String partialDate; - - @Schema( - description = "Location where the measurement taken", - example = "WASHINGTON VA MEDICAL CENTER") - private String organization; - - @Schema(description = "Document Identifier", example = "{BFA4943C-4F56-4AC5-B48F-5FDE469B1226}") - private String document; - - @Schema(description = "VBMS Receipt Date", example = "1999-12-31") - private String receiptDate; - - @Schema(description = "Document Page Number", example = "55") - private String page; - - @Override - public int compareTo(AbdCondition otherCondition) { - return StringUtils.compare(onsetDate, otherCondition.onsetDate); - } -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdEvidence.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdEvidence.java deleted file mode 100644 index 5b4b6cff1d..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdEvidence.java +++ /dev/null @@ -1,35 +0,0 @@ -package gov.va.vro.abddataaccess.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -import java.util.List; - -@Getter -@Setter -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class AbdEvidence { - @Schema(description = "List of relevant medications") - private List medications; - - @Schema(description = "List of relevant conditions") - private List conditions; - - @Schema(description = "List of relevant procedures") - private List procedures; - - @Schema(description = "List of relevant blood pressures") - @JsonProperty("bp_readings") - private List bloodPressures; - - @Schema(description = "Veteran service locations for the pdf") - private List serviceLocations; - - @JsonProperty("documentsWithoutAnnotationsChecked") - private List documentsWithoutAnnotationsChecked; -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdEvidenceWithSummary.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdEvidenceWithSummary.java deleted file mode 100644 index 50fa8e0071..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdEvidenceWithSummary.java +++ /dev/null @@ -1,34 +0,0 @@ -package gov.va.vro.abddataaccess.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -import java.util.Map; - -@Getter -@Setter -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class AbdEvidenceWithSummary { - - @Schema(description = "Medical Evidence") - private AbdEvidence evidence; - - @Schema(description = "Evidence Counts") - private Map evidenceSummary; - - private String errorMessage; - - @Schema(description = "Claim submission id", example = "1234") - private String claimSubmissionId; - - @Schema(description = "Namespace for the claimSubmissionId", example = "mas-Form526Submission") - private String idType; - - @Schema(description = "Sufficient for Fast Tracking flag") - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private Boolean sufficientForFastTracking; -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdMedication.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdMedication.java deleted file mode 100644 index 57ed28bcd6..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdMedication.java +++ /dev/null @@ -1,85 +0,0 @@ -package gov.va.vro.abddataaccess.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import org.apache.commons.lang3.StringUtils; - -import java.util.List; - -@Getter -@Setter -@EqualsAndHashCode(onlyExplicitlyIncluded = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class AbdMedication implements Comparable { - @EqualsAndHashCode.Include - @Schema(description = "Status of medication", example = "Active") - private String status; - - @Schema( - description = "Location where the measurement taken", - example = "WASHINGTON VA MEDICAL CENTER") - private String organization; - - @Schema(description = "Notes of the medication order") - private List notes; - - @EqualsAndHashCode.Include - @Schema(description = "Medication name", example = "Hydrochlorothiazide 6.25 MG") - private String description; - - @EqualsAndHashCode.Include - @Schema(description = "Number of refills remaining", example = "2") - private int refills; - - @EqualsAndHashCode.Include - @Schema(description = "Medication can be for asthma", example = "true") - private Boolean asthmaRelevant; - - private Boolean conditionRelated; - private String suggestedCategory; - - @Schema(description = "Formatted date", example = "12/31/1999") - private String dateFormatted; - - @EqualsAndHashCode.Include - @Schema(description = "Duration of the medication") - private String duration; - - @EqualsAndHashCode.Include - @Schema(description = "The date when medication ordered", example = "2021-04-05T23:00:00Z") - private String authoredOn; - - @Schema( - description = "Instructions on medication usage", - example = "[\"QID PRN\", \"As directed by physician\"]") - private List dosageInstructions; - - @EqualsAndHashCode.Include - @Schema(description = "Medication administration method", example = "INHALATION ORAL") - private String route; - - @Schema(description = "Source of this data", example = "LH") - private String dataSource = "LH"; - - @Schema(description = "Document Identifier", example = "{BFA4943C-4F56-4AC5-B48F-5FDE469B1226}") - private String document; - - @Schema(description = "VBMS Receipt Date", example = "1999-12-31") - private String receiptDate; - - @Schema(description = "Document Page Number", example = "55") - private String page; - - @Schema(description = "Partial date from OCR", example = "**/**/1988") - private String partialDate; - - @Override - public int compareTo(AbdMedication otherMedication) { - return StringUtils.compare(authoredOn, otherMedication.authoredOn); - } -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdProcedure.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdProcedure.java deleted file mode 100644 index 13aa1af520..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdProcedure.java +++ /dev/null @@ -1,30 +0,0 @@ -package gov.va.vro.abddataaccess.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import org.apache.commons.lang3.StringUtils; - -@Getter -@Setter -@EqualsAndHashCode(onlyExplicitlyIncluded = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class AbdProcedure implements Comparable { - @EqualsAndHashCode.Include private String text; - @EqualsAndHashCode.Include private String code; - @EqualsAndHashCode.Include private String status; - @EqualsAndHashCode.Include private String performedDate; - @EqualsAndHashCode.Include private String codeSystem; - - @Schema(description = "Source of this data", example = "LH") - private String dataSource = "LH"; - - @Override - public int compareTo(AbdProcedure otherProcedure) { - return StringUtils.compare(performedDate, otherProcedure.performedDate); - } -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdResponse.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdResponse.java deleted file mode 100644 index ec2b98d5bc..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/AbdResponse.java +++ /dev/null @@ -1,60 +0,0 @@ -package gov.va.vro.abddataaccess.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.Getter; -import lombok.Setter; - -/** It represents a response object for a claim evidence request. */ -@Getter -@Setter -public class AbdResponse { - private String veteranIcn; - private String diagnosticCode; - - private String claimSubmissionId; - - @JsonInclude(JsonInclude.Include.ALWAYS) - private AbdEvidence evidence; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private String errorMessage; - - public AbdResponse() {} - - /** - * Constructs the object with the values provided. - * - * @param claim a claim. - */ - public AbdResponse(AbdClaim claim) { - veteranIcn = claim.getVeteranIcn(); - diagnosticCode = claim.getDiagnosticCode(); - claimSubmissionId = claim.getClaimSubmissionId(); - } - - /** - * Constructs the object with the initial values. - * - * @param claim a claim. - * @param evidence the claim evidence. - */ - public AbdResponse(AbdClaim claim, AbdEvidence evidence) { - veteranIcn = claim.getVeteranIcn(); - diagnosticCode = claim.getDiagnosticCode(); - claimSubmissionId = claim.getClaimSubmissionId(); - this.evidence = evidence; - } - - /** - * Constructs the object for a claim and an error message. - * - * @param claim a claim. - * @param errorMessage error message. - */ - public AbdResponse(AbdClaim claim, String errorMessage) { - veteranIcn = claim.getVeteranIcn(); - diagnosticCode = claim.getDiagnosticCode(); - claimSubmissionId = claim.getClaimSubmissionId(); - this.errorMessage = errorMessage; - } -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/HealthAssessmentSource.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/HealthAssessmentSource.java deleted file mode 100644 index 068533f9b6..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/HealthAssessmentSource.java +++ /dev/null @@ -1,6 +0,0 @@ -package gov.va.vro.abddataaccess.model; - -public enum HealthAssessmentSource { - LIGHTHOUSE, - MAS -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/HealthDataAssessment.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/HealthDataAssessment.java deleted file mode 100644 index 6432b2b79a..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/HealthDataAssessment.java +++ /dev/null @@ -1,41 +0,0 @@ -package gov.va.vro.abddataaccess.model; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - -@NoArgsConstructor -@Getter -@Setter -public class HealthDataAssessment { - @NotBlank - @Schema(description = "Veteran medical internal control number (EHR id)", example = "90653535") - private String veteranIcn; - - @Schema(description = "Claim submission id", example = "1234") - private String claimSubmissionId; - - @NotBlank - @Schema(description = "Diagnostic code for the claim contention", example = "7101") - private String diagnosticCode; - - @Schema(description = "Medical evidence supporting assessment") - @JsonInclude - private AbdEvidence evidence; - - @Schema(description = "Error message in the case of an error") - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private String errorMessage; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private String disabilityActionType; - - @Schema(description = "date of the Claim") - private String claimSubmissionDateTime; - - @JsonIgnore private HealthAssessmentSource source = HealthAssessmentSource.LIGHTHOUSE; -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/LighthouseTokenMessage.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/LighthouseTokenMessage.java deleted file mode 100644 index 982dd093af..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/LighthouseTokenMessage.java +++ /dev/null @@ -1,25 +0,0 @@ -package gov.va.vro.abddataaccess.model; - -import com.fasterxml.jackson.databind.PropertyNamingStrategies; -import com.fasterxml.jackson.databind.annotation.JsonNaming; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - -/** - * A Lighthouse token message. - * - * @author Warren Lin - */ -@Setter -@Getter -@NoArgsConstructor -@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) -public class LighthouseTokenMessage { - private String accessToken; - private String tokenType; - private String scope; - private int expiresIn; - private String state; - private String patient; -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/ServiceLocation.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/ServiceLocation.java deleted file mode 100644 index 6cde3e4772..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/model/ServiceLocation.java +++ /dev/null @@ -1,31 +0,0 @@ -package gov.va.vro.abddataaccess.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -@Getter -@Setter -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ServiceLocation { - - @Schema(description = "Veteran service location", example = "Vietnam") - private String location; - - @Schema( - description = "Source document of information", - example = "VA 21-3101 Request for Information") - private String document; - - @Schema(description = "Receipt date", example = "1999-12-31") - private String receiptDate; - - @Schema(description = "Page", example = "1") - private String page; - - @Schema(description = "Document Identifier", example = "{BFA4943C-4F56-4AC5-B48F-5FDE469B1226}") - private String documentId; -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/AbdDomain.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/AbdDomain.java deleted file mode 100644 index 8673bb3e62..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/AbdDomain.java +++ /dev/null @@ -1,22 +0,0 @@ -package gov.va.vro.abddataaccess.service; - -/** - * Represents medical data domains used in decision rules in Automated Benefit Delivery health - * assessment. - */ -public enum AbdDomain { - MEDICATION("launch patient/MedicationRequest.read"), - BLOOD_PRESSURE("launch patient/Observation.read"), - PROCEDURE("launch patient/Procedure.read"), - CONDITION("launch patient/Condition.read"); - - private final String scope; - - AbdDomain(String scope) { - this.scope = scope; - } - - public String getScope() { - return scope; - } -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/AbdRabbitReceiver.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/AbdRabbitReceiver.java deleted file mode 100644 index ca15fcfa20..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/AbdRabbitReceiver.java +++ /dev/null @@ -1,34 +0,0 @@ -package gov.va.vro.abddataaccess.service; - -import gov.va.vro.abddataaccess.model.AbdClaim; -import gov.va.vro.abddataaccess.model.AbdEvidence; -import gov.va.vro.abddataaccess.model.AbdResponse; -import lombok.extern.slf4j.Slf4j; -import org.springframework.amqp.rabbit.annotation.RabbitListener; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -@Slf4j -public class AbdRabbitReceiver { - @Autowired private FhirClient client; - - @RabbitListener(queues = "${abd-data-access.rabbitmq.claim-submit-queue}") - AbdResponse receiveMessage(AbdClaim claim) { - log.info( - "Claim submission for icn={}, claim={}", - claim.getVeteranIcn(), - claim.getClaimSubmissionId()); - try { - AbdEvidence evidence = client.getMedicalEvidence(claim); - AbdResponse response = new AbdResponse(claim, evidence); - return response; - } catch (Exception e) { - // Message can be null despite exception existing. - log.error(e.getMessage()); - AbdResponse response = new AbdResponse(claim); - response.setErrorMessage("Lighthouse Error: " + e.getMessage()); - return response; - } - } -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/FhirClient.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/FhirClient.java deleted file mode 100644 index d1c1ade623..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/FhirClient.java +++ /dev/null @@ -1,393 +0,0 @@ -package gov.va.vro.abddataaccess.service; - -import ca.uhn.fhir.parser.DataFormatException; -import ca.uhn.fhir.parser.IParser; -import gov.va.vro.abddataaccess.config.properties.LighthouseProperties; -import gov.va.vro.abddataaccess.exception.AbdException; -import gov.va.vro.abddataaccess.model.AbdBloodPressure; -import gov.va.vro.abddataaccess.model.AbdClaim; -import gov.va.vro.abddataaccess.model.AbdCondition; -import gov.va.vro.abddataaccess.model.AbdEvidence; -import gov.va.vro.abddataaccess.model.AbdMedication; -import gov.va.vro.abddataaccess.model.AbdProcedure; -import lombok.extern.slf4j.Slf4j; -import org.hl7.fhir.r4.model.Bundle; -import org.hl7.fhir.r4.model.Bundle.BundleEntryComponent; -import org.hl7.fhir.r4.model.Condition; -import org.hl7.fhir.r4.model.MedicationRequest; -import org.hl7.fhir.r4.model.Observation; -import org.hl7.fhir.r4.model.Procedure; -import org.jetbrains.annotations.NotNull; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.client.RestClientException; -import org.springframework.web.client.RestTemplate; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.function.Function; -import java.util.stream.Collectors; - -@Slf4j -public class FhirClient { - private static final String LAST_UPDATED_DATE_FORMAT = "yyyy-MM-dd"; - private static final String LIGHTHOUSE_AUTH_HEAD = "Authorization"; - private static final int DEFAULT_PAGE = 0; - private static final int DEFAULT_SIZE = 100; - - @Autowired private LighthouseProperties properties; - - @Autowired private RestTemplate restTemplate; - - @Autowired private IParser jsonParser; - - @Autowired private LighthouseApiService lighthouseApiService; - - private String lastUpdated = ""; - - private static class SearchSpec { - private String resourceType; - private String[] searchParams; - private String[] searchValues; - - public SearchSpec(String resourceType) { - this.resourceType = resourceType; - } - - public SearchSpec(String resourceType, String id) { - this.resourceType = resourceType; - searchParams = new String[] {"patient"}; - searchValues = new String[] {id}; - } - - public void setSearchParams(String[] searchParams) { - this.searchParams = searchParams; - } - - public void setSearchValues(String[] searchValues) { - this.searchValues = searchValues; - } - - public String getUrl(String lastUpdated) { - StringBuilder url = - new StringBuilder( - String.format("%s?%s=%s", resourceType, searchParams[0], searchValues[0])); - if (!lastUpdated.isEmpty()) { - url.append(String.format("&_lastUpdated=ge%s", lastUpdated)); - } - for (int i = 1; i < searchParams.length; ++i) { - url.append(String.format("&%s=%s", searchParams[i], searchValues[i])); - } - return url.toString(); - } - } - - private static final Map dpToDomains = - Map.ofEntries( - new AbstractMap.SimpleEntry<>( - "0", - new AbdDomain[] { - AbdDomain.BLOOD_PRESSURE, - AbdDomain.CONDITION, - AbdDomain.PROCEDURE, - AbdDomain.MEDICATION - }), - new AbstractMap.SimpleEntry<>( - "7101", - new AbdDomain[] { - AbdDomain.BLOOD_PRESSURE, AbdDomain.MEDICATION, AbdDomain.CONDITION - }), - new AbstractMap.SimpleEntry<>("6602", new AbdDomain[] {AbdDomain.MEDICATION}), - new AbstractMap.SimpleEntry<>( - "6522", - new AbdDomain[] {AbdDomain.MEDICATION, AbdDomain.CONDITION, AbdDomain.PROCEDURE}), - new AbstractMap.SimpleEntry<>( - "6602v2", new AbdDomain[] {AbdDomain.MEDICATION, AbdDomain.CONDITION}), - new AbstractMap.SimpleEntry<>( - "6510", - new AbdDomain[] {AbdDomain.MEDICATION, AbdDomain.PROCEDURE, AbdDomain.CONDITION}), - new AbstractMap.SimpleEntry<>( - "cancer", new AbdDomain[] {AbdDomain.MEDICATION, AbdDomain.CONDITION})); - - private static final Map> domainToSearchSpec = - Map.ofEntries( - new AbstractMap.SimpleEntry>( - AbdDomain.BLOOD_PRESSURE, - (id) -> { - SearchSpec result = new SearchSpec("Observation"); - result.setSearchParams(new String[] {"patient", "code"}); - result.setSearchValues(new String[] {id, "85354-9"}); - return result; - }), - new AbstractMap.SimpleEntry>( - AbdDomain.MEDICATION, (id) -> new SearchSpec("MedicationRequest", id)), - new AbstractMap.SimpleEntry>( - AbdDomain.PROCEDURE, (id) -> new SearchSpec("Procedure", id)), - new AbstractMap.SimpleEntry>( - AbdDomain.CONDITION, - (id) -> { - SearchSpec result = new SearchSpec("Condition"); - result.setSearchParams(new String[] {"patient", "category"}); - result.setSearchValues(new String[] {id, "encounter-diagnosis"}); - return result; - })); - - /** - * Gets a FHIR {@link Bundle} for the given parameters. - * - * @param url a URL string. - * @param lighthouseToken a token to access Lighthouse FHIR API.. - * @return a {@link Bundle}. - * @throws AbdException when error occurs. - */ - public Bundle getFhirBundle(String url, String lighthouseToken) throws AbdException { - HttpHeaders headers = new HttpHeaders(); - headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON)); - headers.set(LIGHTHOUSE_AUTH_HEAD, lighthouseToken); - HttpEntity request = new HttpEntity(headers); - - log.info("Get FHIR data from {}", url); - try { - ResponseEntity response = - restTemplate.exchange(url, HttpMethod.GET, request, String.class); - if (response.getStatusCode() != HttpStatus.OK) { - log.error("Unexpected response from lighthouse {}", response.getStatusCode()); - log.error("Body is {}", response.getBody()); - throw new AbdException("Unable to get the bundle for the patient."); - } - String strBody = response.getBody(); - Bundle bundle = jsonParser.parseResource(Bundle.class, strBody); - return bundle; - } catch (RestClientException ex) { - log.error("Unable to get bundle from {}", url, ex); - throw new AbdException("Unable to get the bundle for the patient."); - } catch (DataFormatException dfEx) { - log.error("Unable to parse the bundle from {}", url, dfEx); - throw new AbdException("Unable to parse bundle for the patient."); - } - } - - private List getPatientConditions(List entries) { - log.info("Extract patient condition entries. number of entries: {}", entries.size()); - List result = new ArrayList<>(); - for (BundleEntryComponent entry : entries) { - Condition resource = (Condition) entry.getResource(); - AbdCondition summary = FieldExtractor.extractCondition(resource); - result.add(summary); - } - result.sort(null); - return result; - } - - private List getPatientMedications(List entries) { - log.info("Extract patient medication entries. number of entries: {}", entries.size()); - List result = new ArrayList<>(); - for (BundleEntryComponent entry : entries) { - MedicationRequest resource = (MedicationRequest) entry.getResource(); - AbdMedication summary = FieldExtractor.extractMedication(resource); - result.add(summary); - } - result.sort(null); - return result; - } - - private List getPatientProcedures(List entries) { - log.info("Extract patient procedure entries. number of entries: {}", entries.size()); - List result = new ArrayList<>(); - for (BundleEntryComponent entry : entries) { - Procedure resource = (Procedure) entry.getResource(); - AbdProcedure summary = FieldExtractor.extractProcedure(resource); - result.add(summary); - } - result.sort(null); - return result; - } - - /** - * Gets a list of blood pressure readings. - * - * @param entries a list of entries from a FHIR bundle. - * @return a list of {@link AbdBloodPressure}. - */ - public List getPatientBloodPressures(List entries) { - log.info("Extract patient blood pressure entries. number of entries: {}", entries.size()); - List result = new ArrayList<>(); - for (BundleEntryComponent entry : entries) { - Observation resource = (Observation) entry.getResource(); - AbdBloodPressure bpReading = FieldExtractor.extractBloodPressure(resource); - if ((bpReading.getDiastolic() == null) && (bpReading.getSystolic() == null)) { - continue; // skip it if both systolic and diastolic values are missing. - } - // Set default systolic / diastolic blood pressure value if one of them not exist. - if (bpReading.getDiastolic() == null) { - bpReading.setDiastolic( - FieldExtractor.getDefaultBpMeasurement(FieldExtractor.BpMeasure.DIASTOLIC)); - } - if (bpReading.getSystolic() == null) { - bpReading.setSystolic( - FieldExtractor.getDefaultBpMeasurement(FieldExtractor.BpMeasure.SYSTOLIC)); - } - result.add(bpReading); - } - result.sort(null); - return result; - } - - /** - * Gets domains for the given claim. - * - * @param claim an {@link AbdClaim}. - * @return a map of domains associated with the claim. - * @throws AbdException error occurs. - */ - public Map> getDomainBundles(AbdClaim claim) - throws AbdException { - AbdDomain[] domains = dpToDomains.get(claim.getDiagnosticCode()); - if (domains == null) { - log.error("domains not found for the claim diagnostic code."); - return null; - } - - Map> result = new HashMap<>(); - String patientIcn = claim.getVeteranIcn(); - result = - Arrays.stream(domains) - .parallel() - .collect(Collectors.toMap(d -> d, d -> getBundleEntryComponents(patientIcn, d))); - return result; - } - - @NotNull - private List getBundleEntryComponents(String patientIcn, AbdDomain domain) { - Map> result = new HashMap<>(); - try { - String lighthouseToken = lighthouseApiService.getLighthouseToken(domain, patientIcn); - List records = getRecords(patientIcn, domain, lighthouseToken); - return records; - } catch (AbdException e) { - log.error("Failure in get light house patient data for {}", domain.name(), e); - return null; - } - } - - private List getRecords( - String patientIcn, AbdDomain domain, String lighthouseToken) throws AbdException { - SearchSpec searchSpec = domainToSearchSpec.get(domain).apply(patientIcn); - String url = searchSpec.getUrl(getLastUpdated()) + "&_count=" + DEFAULT_SIZE; - - String baseUrl = properties.getFhirurl(); - String fullUrl = baseUrl + "/" + url; - log.info("Retrieve data for {} for ICN = {}", domain.name(), patientIcn); - - List records = new ArrayList<>(); - String nextLink = fullUrl; - do { - log.info("Next link is {}", nextLink); - Bundle bundle = getFhirBundle(nextLink, lighthouseToken); - nextLink = ""; - if (bundle.hasLink()) { - Optional next = - bundle.getLink().stream().filter(l -> l.getRelation().equals("next")).findFirst(); - if (next.isPresent()) { - nextLink = next.get().getUrl(); - } - } - List entries = bundle.getEntry(); - if (entries.size() > 0) { - log.info("Adding {} entries to records", entries.size()); - records.addAll(entries); - } else { - log.info("Empty page from fhir service. Ending pulling resources."); - break; - } - } while (!nextLink.isEmpty()); - return records; - } - - private synchronized String getLastUpdated() { - if (lastUpdated.isEmpty()) { - String lastUpdatedDate = properties.getFilterLastUpdatedDate(); - if ((lastUpdatedDate != null) && !lastUpdatedDate.isEmpty()) { - log.info("Update lastUpdated to {}", lastUpdatedDate); - SimpleDateFormat dft = new SimpleDateFormat(LAST_UPDATED_DATE_FORMAT); - try { - // Verify that it is in the expected date format - dft.parse(lastUpdatedDate); - lastUpdated = lastUpdatedDate; - log.info("Set lastUpdated search parameter to {}", lastUpdated); - } catch (ParseException e) { - log.error( - "Invalid filterLastUpdatedDate, {}, in the properties setup. No lastUpdated filter is used in LH service.", - lastUpdatedDate); - } - } else { - log.info( - "No FilterLastUpdatedDate is set in properties. No lastUpdated filter is used in LH service."); - } - } - return lastUpdated; - } - - /** - * Gets medical evidence for a claim. - * - * @param claim a claim. - * @return a medical evidence object. - * @throws AbdException error occurs. - */ - public AbdEvidence getMedicalEvidence(AbdClaim claim) throws AbdException { - Map> components = getDomainBundles(claim); - if (components == null) { - return null; - } - return getAbdEvidence(components); - } - - /** - * Gets an AbdEvidence object from a set of domain components. - * - * @param components a map of AbdDomain components. - * @return an {@link AbdEvidence}. - */ - @NotNull - public AbdEvidence getAbdEvidence(Map> components) { - AbdEvidence result = new AbdEvidence(); - for (Map.Entry> entryComponent : components.entrySet()) { - List entries = entryComponent.getValue(); - switch (entryComponent.getKey()) { - case MEDICATION -> { - List medications = getPatientMedications(entries); - result.setMedications(medications); - } - case CONDITION -> { - List conditions = getPatientConditions(entries); - result.setConditions(conditions); - } - case PROCEDURE -> { - List procedures = getPatientProcedures(entries); - result.setProcedures(procedures); - } - case BLOOD_PRESSURE -> { - List bps = getPatientBloodPressures(entries); - result.setBloodPressures(bps); - } - default -> { - } - } - } - return result; - } -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/FieldExtractor.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/FieldExtractor.java deleted file mode 100644 index 4f982b7a68..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/FieldExtractor.java +++ /dev/null @@ -1,352 +0,0 @@ -package gov.va.vro.abddataaccess.service; - -import gov.va.vro.abddataaccess.model.AbdBloodPressure; -import gov.va.vro.abddataaccess.model.AbdBpMeasurement; -import gov.va.vro.abddataaccess.model.AbdCondition; -import gov.va.vro.abddataaccess.model.AbdMedication; -import gov.va.vro.abddataaccess.model.AbdProcedure; -import org.hl7.fhir.r4.model.Annotation; -import org.hl7.fhir.r4.model.CodeableConcept; -import org.hl7.fhir.r4.model.Coding; -import org.hl7.fhir.r4.model.Condition; -import org.hl7.fhir.r4.model.DateTimeType; -import org.hl7.fhir.r4.model.Dosage; -import org.hl7.fhir.r4.model.MedicationRequest; -import org.hl7.fhir.r4.model.Observation; -import org.hl7.fhir.r4.model.Observation.ObservationComponentComponent; -import org.hl7.fhir.r4.model.Procedure; -import org.hl7.fhir.r4.model.Procedure.ProcedureStatus; -import org.hl7.fhir.r4.model.Quantity; -import org.hl7.fhir.r4.model.Reference; - -import java.math.BigDecimal; -import java.math.RoundingMode; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; - -/** It contains the functions to extract data from FHIR objects for Abd data models. */ -public class FieldExtractor { - - private static final String SNOMED = "http://snomed.info"; - private static final String MISSING = "*Missing*"; - public static final String SYSTOLIC_BP_CODE = "8480-6"; - public static final String DIASTOLIC_BP_CODE = "8462-4"; - private static final String BP_UNIT = "mm[Hg]"; - private static final String SYSTOLIC_DES = "Systolic blood pressure"; - private static final String DIASTOLIC_DES = "Diastolic blood pressure"; - - public enum BpMeasure { - SYSTOLIC(SYSTOLIC_BP_CODE, SYSTOLIC_DES, BP_UNIT), - DIASTOLIC(DIASTOLIC_BP_CODE, DIASTOLIC_DES, BP_UNIT); - - private String code; - private String unit; - private String display; - - BpMeasure(String code, String display, String unit) { - this.code = code; - this.display = display; - this.unit = unit; - } - - public String getCode() { - return code; - } - - public String getUnit() { - return unit; - } - - public String getDisplay() { - return display; - } - } - - private static String toDate(DateTimeType dateTimeType) { - String value = dateTimeType.asStringValue(); - if (value == null) { - return ""; - } - int index = value.indexOf('T'); - if (index > 0) { - return value.substring(0, index); - } - return value; - } - - /** - * Converts a date to a string with the specified format. - * - * @param date a date. - * @return a string. - */ - private static String formatDate(Date date) { - DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); - return fmt.format(date); - } - - /** - * Get the ICD code from a coding. - * - * @param code code - * @return valid ICD code - */ - public static Coding getValidCoding(CodeableConcept code) { - if (code.hasCoding()) { - for (Coding coding : code.getCoding()) { - if (coding.hasCode() - && !coding.getSystem().trim().startsWith(SNOMED) - && !coding.getCode().startsWith(MISSING)) { - return coding; - } - } - } - return null; - } - - /** - * Creates an {@link AbdCondition} from a Fhir {@link Condition}. - * - * @param condition a Fhir Condition object. - * @return an AbdCondition object. - */ - public static AbdCondition extractCondition(Condition condition) { - AbdCondition result = new AbdCondition(); - - if (condition.hasCode()) { - CodeableConcept code = condition.getCode(); - Coding coding = getValidCoding(code); - if (coding != null) { - result.setCode(coding.getCode()); - if (coding.hasDisplay()) { - result.setText(coding.getDisplay()); - } - } - - String textFound = result.getText(); - - if ((textFound == null || textFound.isEmpty()) && code.hasText()) { - result.setText(code.getText()); - } - } - - if (condition.hasAbatementDateTimeType()) { - result.setAbatementDate(FieldExtractor.toDate(condition.getAbatementDateTimeType())); - } - if (condition.hasOnsetDateTimeType()) { - result.setOnsetDate(FieldExtractor.toDate(condition.getOnsetDateTimeType())); - } - if (condition.hasRecordedDateElement()) { - result.setRecordedDate(FieldExtractor.toDate(condition.getRecordedDateElement())); - } - - if (condition.hasClinicalStatus()) { - CodeableConcept clinicalStatus = condition.getClinicalStatus(); - if (clinicalStatus.hasCoding()) { - Coding coding = clinicalStatus.getCodingFirstRep(); - if (coding.hasCode()) { - String code = coding.getCode(); - result.setStatus(code); - } - } - } - - return result; - } - - /** - * Creates an {@link AbdMedication} object from the given {@link MedicationRequest}. - * - * @param medication a {@link MedicationRequest} object. - * @return an {@link AbdMedication} object. - */ - public static AbdMedication extractMedication(MedicationRequest medication) { - AbdMedication result = new AbdMedication(); - - if (medication.hasMedicationReference()) { - result.setDescription(medication.getMedicationReference().getDisplay()); - } - if (medication.hasAuthoredOn()) { - result.setAuthoredOn(formatDate(medication.getAuthoredOn())); - } - if (medication.hasStatus()) { - result.setStatus(medication.getStatus().getDisplay()); - } - if (medication.hasNote()) { - result.setNotes( - medication.getNote().stream() - .filter(Annotation::hasText) - .map(Annotation::getText) - .collect(Collectors.toList())); - } - if (medication.hasDosageInstruction()) { - List dosages = - medication.getDosageInstruction().parallelStream() - .filter(Dosage::hasText) - .map(Dosage::getText) - .collect(Collectors.toList()); - List codeText = - medication.getDosageInstruction().stream() - .filter(Dosage::hasTiming) - .filter(t -> t.getTiming().hasCode()) - .filter(c -> c.getTiming().getCode().hasText()) - .map(c -> c.getTiming().getCode().getText()) - .collect(Collectors.toList()); - dosages.addAll(codeText); - result.setDosageInstructions(dosages); - String routes = - medication.getDosageInstruction().stream() - .filter(d -> d.hasRoute() && d.getRoute().hasText()) - .map(d -> d.getRoute().getText()) - .findFirst() - .orElse(""); // Take 1st one for now - result.setRoute(routes); - } - if (medication.hasDispenseRequest()) { - if (medication.getDispenseRequest().hasExpectedSupplyDuration()) { - result.setDuration( - medication.getDispenseRequest().getExpectedSupplyDuration().getDisplay()); - } - if (medication.getDispenseRequest().hasNumberOfRepeatsAllowed()) { - result.setRefills(medication.getDispenseRequest().getNumberOfRepeatsAllowed()); - } - } - - return result; - } - - /** - * Creates an AbdProcedure object from a given Fhir Procedure object. - * - * @param procedure a {@link Procedure}. - * @return a {@link AbdProcedure}. - */ - public static AbdProcedure extractProcedure(Procedure procedure) { - AbdProcedure result = new AbdProcedure(); - - if (procedure.hasCode()) { - CodeableConcept code = procedure.getCode(); - if (code.hasCoding()) { - Coding coding = code.getCodingFirstRep(); - - if (coding.hasCode()) { - result.setCode(coding.getCode()); - } - - if (coding.hasDisplay()) { - result.setText(coding.getDisplay()); - } - - if (coding.hasSystem()) { - result.setCodeSystem(coding.getSystem()); - } - } - - if (result.getText() == null && code.hasText()) { - result.setText(code.getText()); - } - } - - if (procedure.hasStatus()) { - ProcedureStatus status = procedure.getStatus(); - result.setStatus(status.getDisplay()); - } - - if (procedure.hasPerformedDateTimeType()) { - DateTimeType dateTime = procedure.getPerformedDateTimeType(); - result.setPerformedDate(FieldExtractor.toDate(dateTime)); - } - - return result; - } - - private static AbdBpMeasurement extractBpMeasurement( - Coding coding, ObservationComponentComponent component) { - AbdBpMeasurement result = new AbdBpMeasurement(); - - result.setCode(coding.getCode()); - result.setDisplay(coding.getDisplay()); - - if (component.hasValueQuantity()) { - Quantity quantity = component.getValueQuantity(); - - result.setUnit(quantity.getUnit()); - - if (quantity.hasValue()) { - BigDecimal value = quantity.getValue().setScale(1, RoundingMode.HALF_UP); - result.setValue(value); - } - } - - return result; - } - - /** - * Creates an AbdBloodPressure object from a Fhir Observation object. - * - * @param observation an {@link Observation}. - * @return an {@link AbdBloodPressure}. - */ - public static AbdBloodPressure extractBloodPressure(Observation observation) { - AbdBloodPressure result = new AbdBloodPressure(); - - if (observation.hasEffectiveDateTimeType()) { - result.setDate(toDate(observation.getEffectiveDateTimeType())); - } - - if (observation.hasComponent()) { - for (ObservationComponentComponent component : observation.getComponent()) { - if (component.hasCode() && component.hasValueQuantity()) { - CodeableConcept codeableConcept = component.getCode(); - if (codeableConcept.hasCoding()) { - Coding codingInner = codeableConcept.getCodingFirstRep(); - if (codingInner.hasCode()) { - String bpType = codingInner.getCode(); - if (SYSTOLIC_BP_CODE.equals(bpType)) { - AbdBpMeasurement m = extractBpMeasurement(codingInner, component); - if (m.getValue() != null) { - result.setSystolic(m); - } - } - if (DIASTOLIC_BP_CODE.equals(bpType)) { - AbdBpMeasurement m = extractBpMeasurement(codingInner, component); - if (m.getValue() != null) { - result.setDiastolic(m); - } - } - } - } - } - } - } - - if (observation.hasPerformer()) { - List performers = observation.getPerformer(); - performers.forEach( - reference -> { - if (reference.hasReference() && reference.hasDisplay()) { - String key = reference.getReference(); - if (key.contains("Practitioner")) { - result.setPractitioner(reference.getDisplay()); - } else if (key.contains("Organization")) { - result.setOrganization(reference.getDisplay()); - } - } - }); - } - - return result; - } - - public static AbdBpMeasurement getDefaultBpMeasurement(BpMeasure measurement) { - AbdBpMeasurement result = new AbdBpMeasurement(); - result.setCode(measurement.code); - result.setUnit(measurement.getUnit()); - result.setDisplay(measurement.getDisplay()); - result.setValue(BigDecimal.valueOf(0)); - return result; - } -} diff --git a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/LighthouseApiService.java b/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/LighthouseApiService.java deleted file mode 100644 index 3bcf166b4c..0000000000 --- a/svc-lighthouse-api/src/main/java/gov/va/vro/abddataaccess/service/LighthouseApiService.java +++ /dev/null @@ -1,173 +0,0 @@ -package gov.va.vro.abddataaccess.service; - -import com.fasterxml.jackson.databind.ObjectMapper; -import gov.va.vro.abddataaccess.config.properties.LighthouseProperties; -import gov.va.vro.abddataaccess.exception.AbdException; -import gov.va.vro.abddataaccess.model.LighthouseTokenMessage; -import io.jsonwebtoken.Jwts; -import io.jsonwebtoken.SignatureAlgorithm; -import lombok.AllArgsConstructor; -import lombok.NoArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.bouncycastle.util.io.pem.PemObject; -import org.bouncycastle.util.io.pem.PemReader; -import org.jetbrains.annotations.NotNull; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Service; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; -import org.springframework.web.client.RestClientException; -import org.springframework.web.client.RestTemplate; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.security.KeyFactory; -import java.security.NoSuchAlgorithmException; -import java.security.NoSuchProviderException; -import java.security.PrivateKey; -import java.security.Security; -import java.security.spec.InvalidKeySpecException; -import java.security.spec.PKCS8EncodedKeySpec; -import java.util.Base64; -import java.util.Date; - -/** - * Lighthouse FHIR API access service. - * - * @author WarrenLin - */ -@Service -@Slf4j -@AllArgsConstructor -@NoArgsConstructor -public class LighthouseApiService { - - static { - if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) { - Security.addProvider(new BouncyCastleProvider()); - } - } - - private static final String PATIENT_CODING = "{\"patient\":\"%s\"}"; - - @Autowired private LighthouseProperties lhProps; - - @Autowired private RestTemplate restTemplate; - - /** - * Creates a bear token to access the Lighthouse FHIR API endpoint for the given patient. - * - * @param domain the domain data to be retrieved from the Lighthouse FHIR API. - * @param patientIcn the patient ICN. - * @return a token. - * @throws AbdException when error occurs. - */ - public String getLighthouseToken(AbdDomain domain, String patientIcn) throws AbdException { - String scope = domain.getScope(); - LighthouseTokenMessage tokenMessage = getToken(patientIcn, scope); - return "Bearer " + tokenMessage.getAccessToken(); - } - - /** - * Gets patient ICN coded based on Lighthouse API requirement. - * - * @param patientIcn Patient ICN - * @return a string. - */ - private String getPatientCoding(String patientIcn) { - String patientString = String.format(PATIENT_CODING, patientIcn); - return Base64.getEncoder().encodeToString(patientString.getBytes()); - } - - private String getCcgAssertion(String assertionUrl, String clientId) throws AbdException { - try { - InputStream inputStream = new ByteArrayInputStream(lhProps.getPemkey().getBytes()); - final PemReader pemReader = new PemReader(new InputStreamReader(inputStream)); - PemObject pemObject; - try { - pemObject = pemReader.readPemObject(); - } finally { - pemReader.close(); - } - final byte[] content = pemObject.getContent(); - final PKCS8EncodedKeySpec privKeySpec = new PKCS8EncodedKeySpec(content); - final KeyFactory factory = KeyFactory.getInstance("RSA", "BC"); - PrivateKey key = factory.generatePrivate(privKeySpec); - - Date issuedAt = new Date(); - Date expiredOn = new Date(issuedAt.getTime() + 60 * 3 * 1000); - return Jwts.builder() - .setAudience(assertionUrl) - .setIssuer(clientId) - .setSubject(clientId) - .setIssuedAt(issuedAt) - .setExpiration(expiredOn) - .signWith(SignatureAlgorithm.RS256, key) - .compact(); - } catch (IOException - | NoSuchAlgorithmException - | NoSuchProviderException - | InvalidKeySpecException e) { - log.error("Failed to create assertion for VA Lighthouse API. {}", e.getMessage(), e); - throw new AbdException("Failed to create signing key for VA Lighthouse API.", e); - } catch (NullPointerException e) { - log.error("Failed to find a valid key for VA Lighthouse API. {}", e.getMessage(), e); - throw new AbdException("Cannot find a valid key for Lighthouse access.", e); - } - } - - private LighthouseTokenMessage getToken(String patientIcn, String scope) throws AbdException { - String assertion = getCcgAssertion(lhProps.getAssertionurl(), lhProps.getClientId()); - String result = getToken(assertion, patientIcn, scope); - ObjectMapper mapper = new ObjectMapper(); - try { - return mapper.readValue(result, LighthouseTokenMessage.class); - } catch (IOException e) { - log.error("Failed to parse lighthouse token message.", e); - throw new AbdException("Failed to parse lighthouse token message.", e); - } - } - - private String getToken(String assertion, String patientIcn, String scope) throws AbdException { - return getToken(lhProps.getTokenurl(), assertion, patientIcn, scope); - } - - private String getToken(String tokenUtl, String assertion, String patientIcn, String scope) - throws AbdException { - log.info("get httpEntity for token. tokenurl={}\n, scope={}", tokenUtl, scope); - HttpEntity> httpEntity = - getLighthouseTokenRequestEntity(assertion, patientIcn, scope); - try { - ResponseEntity tokenResp = - restTemplate.postForEntity(tokenUtl, httpEntity, String.class); - - return tokenResp.getBody(); - } catch (RestClientException e) { - log.error("Failed to get Lighthouse token.", e); - throw new AbdException("Failed to get Lighthouse token.", e); - } - } - - @NotNull - private HttpEntity> getLighthouseTokenRequestEntity( - String assertion, String patientIcn, String scope) { - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); - MultiValueMap requestBody = new LinkedMultiValueMap<>(); - String launchCode = getPatientCoding(patientIcn); - requestBody.add("grant_type", "client_credentials"); - requestBody.add( - "client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"); - requestBody.add("client_assertion", assertion); - requestBody.add("launch", launchCode); - requestBody.add("scope", scope); - return new HttpEntity<>(requestBody, headers); - } -} diff --git a/svc-lighthouse-api/src/main/resources/application-end2end-test.yaml b/svc-lighthouse-api/src/main/resources/application-end2end-test.yaml deleted file mode 100644 index 9cfff65d6e..0000000000 --- a/svc-lighthouse-api/src/main/resources/application-end2end-test.yaml +++ /dev/null @@ -1,8 +0,0 @@ -# Contains properties for end-to-end tests -# application.properties is loaded, then this file is loaded - -# Lighthouse FHIR API -lh: - tokenurl: http://mock-lighthouse-api:20200/token - fhirurl: http://mock-lighthouse-api:20200 - assertionurl: https://deptva-eval.okta.com/oauth2/aus8nm1q0f7VQ0a482p7/v1/token diff --git a/svc-lighthouse-api/src/main/resources/application-nonprod.yaml b/svc-lighthouse-api/src/main/resources/application-nonprod.yaml deleted file mode 100644 index 832aafe127..0000000000 --- a/svc-lighthouse-api/src/main/resources/application-nonprod.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Contains shared properties for non-prod environments (local, dev, qa, sandbox) -# This file is used when a Spring Group Profile is set up -# in application.properties (under spring.profiles.group) to use `nonprod` -# See https://github.com/department-of-veterans-affairs/abd-vro/wiki/Configuration-settings#vros-use-of-spring-profiles -# application.properties is loaded, then this file is loaded - -# server.port=8091 -# server.max-http-header-size=48000 - -# Lighthouse FHIR API -lh: - tokenurl: https://sandbox-api.va.gov/oauth2/health/system/v1/token - fhirurl: https://sandbox-api.va.gov/services/fhir/v0/r4 - assertionurl: https://deptva-eval.okta.com/oauth2/aus8nm1q0f7VQ0a482p7/v1/token diff --git a/svc-lighthouse-api/src/main/resources/application-prod-test.yaml b/svc-lighthouse-api/src/main/resources/application-prod-test.yaml deleted file mode 100644 index 77164ff486..0000000000 --- a/svc-lighthouse-api/src/main/resources/application-prod-test.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# This file is used when ENV=prod -# See https://github.com/department-of-veterans-affairs/abd-vro/wiki/Configuration-settings#vros-use-of-spring-profiles -# application.properties is loaded, then this file is loaded -# Secrets should reference environment variables, which will be set in Kubernetes. - -# server.port=8091 -# server.max-http-header-size=48000 - -# Lighthouse FHIR API -lh: - tokenurl: https://api.va.gov/oauth2/health/system/v1/token - fhirurl: https://api.va.gov/services/fhir/v0/r4 - assertionurl: https://va.okta.com/oauth2/aus8evxtl123l7Td3297/v1/token diff --git a/svc-lighthouse-api/src/main/resources/application-prod.yaml b/svc-lighthouse-api/src/main/resources/application-prod.yaml deleted file mode 100644 index 77164ff486..0000000000 --- a/svc-lighthouse-api/src/main/resources/application-prod.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# This file is used when ENV=prod -# See https://github.com/department-of-veterans-affairs/abd-vro/wiki/Configuration-settings#vros-use-of-spring-profiles -# application.properties is loaded, then this file is loaded -# Secrets should reference environment variables, which will be set in Kubernetes. - -# server.port=8091 -# server.max-http-header-size=48000 - -# Lighthouse FHIR API -lh: - tokenurl: https://api.va.gov/oauth2/health/system/v1/token - fhirurl: https://api.va.gov/services/fhir/v0/r4 - assertionurl: https://va.okta.com/oauth2/aus8evxtl123l7Td3297/v1/token diff --git a/svc-lighthouse-api/src/main/resources/application.yaml b/svc-lighthouse-api/src/main/resources/application.yaml deleted file mode 100644 index 6516dc2e57..0000000000 --- a/svc-lighthouse-api/src/main/resources/application.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# FIXME: Why is this needed? -server: - port: 8091 -# This file contains shared properties across all environments; it is always loaded by Spring -# See https://github.com/department-of-veterans-affairs/abd-vro/wiki/Configuration-settings#vros-use-of-spring-profiles - -spring: - profiles: - active: ${ENV:default} - - ## Define Sprint Profile Groups with group names corresponding to the value of $ENV - # Configure profile group so that application-nonprod.properties is loaded, - # along with application-$ENV.properties, if it exists - group: - local: nonprod - - # and integrationTest - integrationTest: nonprod - - # Remaining profiles are for deployment to LHDI's EKS environments - # Configure profile group so that application-nonprod.properties and application-k8s.properties is loaded, - # along with application-$ENV.properties, if it exists - dev: nonprod,k8s - qa: nonprod,k8s - sandbox: nonprod,k8s - - # For prod, only load application-prod.properties and application-k8s.properties, if they exist - prod: k8s - - ## RabbitMQ Settings - rabbitmq: - host: ${RABBITMQ_PLACEHOLDERS_HOST} - port: 5672 - username: ${RABBITMQ_USERNAME:guest} - password: ${RABBITMQ_PASSWORD:guest} - -abd-data-access: - rabbitmq: - claim-submit-exchange: claim-submit-exchange - claim-submit-queue: claim-submit - claim-submit-routing-key: code.# - -## Lighthouse FHIR API - -lh: - clientId: ${LH_ACCESS_CLIENT_ID} - pemkey: ${LH_PRIVATE_KEY} - - -#Actuator for health check, liveness, and readiness -management: - server: - port: 10101 - endpoint: - health: - show-details: always - enabled: true - probes: - enabled: true - group: - liveness.include: livenessState - readiness.include: readinessState - - endpoints: - enabled-by-default: false - web.exposure.include: health - - diff --git a/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/AppPropertiesTests.java b/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/AppPropertiesTests.java deleted file mode 100644 index 65fcab8070..0000000000 --- a/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/AppPropertiesTests.java +++ /dev/null @@ -1,24 +0,0 @@ -package gov.va.vro.abddataaccess; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import gov.va.vro.abddataaccess.config.AppProperties; -import gov.va.vro.abddataaccess.config.properties.RabbitMqProperties; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.ActiveProfiles; - -@SpringBootTest -@ActiveProfiles("test") -public class AppPropertiesTests { - @Autowired private AppProperties properties; - - @Test - public void testRabbitMqProperties() { - RabbitMqProperties rmqp = properties.rabbitmq(); - - assertEquals("claim-submit-exchange", rmqp.getClaimSubmitExchange()); - assertEquals("claim-submit", rmqp.getClaimSubmitQueue()); - } -} diff --git a/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/CommonData.java b/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/CommonData.java deleted file mode 100644 index 4e3f897e63..0000000000 --- a/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/CommonData.java +++ /dev/null @@ -1,7 +0,0 @@ -package gov.va.vro.abddataaccess; - -import gov.va.vro.abddataaccess.model.AbdClaim; - -public class CommonData { - public static final AbdClaim claim01 = new AbdClaim("9000682", "7101", "1234"); -} diff --git a/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/exception/AbdExceptionTest.java b/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/exception/AbdExceptionTest.java deleted file mode 100644 index 9f1d83cb2c..0000000000 --- a/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/exception/AbdExceptionTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package gov.va.vro.abddataaccess.exception; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotEquals; - -import org.junit.jupiter.api.Test; - -class AbdExceptionTest { - - @Test - public void test() { - final AbdException ex1 = new AbdException(); - final AbdException ex2 = new AbdException("test"); - final AbdException ex3 = new AbdException(ex2); - final AbdException ex4 = new AbdException("test", ex1); - - assertFalse(ex1.getMessage().isEmpty()); - assertEquals("test", ex2.getMessage()); - assertNotEquals(ex1.getMessage(), ex2.getMessage()); - - assertEquals(ex1.getMessage(), ex3.getMessage()); - assertEquals(ex2.getMessage(), ex3.getCause().getMessage()); - - assertEquals(ex2.getMessage(), ex4.getMessage()); - } -} diff --git a/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/model/AbdResponseTest.java b/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/model/AbdResponseTest.java deleted file mode 100644 index 49c8a71298..0000000000 --- a/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/model/AbdResponseTest.java +++ /dev/null @@ -1,87 +0,0 @@ -package gov.va.vro.abddataaccess.model; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; - -import org.junit.jupiter.api.Test; - -import java.util.Collections; - -class AbdResponseTest { - - private static final String TEST_ICN = "90203902"; - private static final String TEST_DIAG_CODE = "9020"; - private static final String TEST_CLAIM_ID = "2000"; - private static final String TEST_TEXT = "some text"; - private static final String TEST_CODE = "8000"; - private static final String TEST_STATUS = "ACTIVE"; - private static final String TEST_DATE = "09/05/2022"; - private static final String TEST_CODESYSTEM = "codesystem"; - private static final String TEST_DURATION = "one month duration"; - private static final String TEST_ROUTE = "route"; - private static final String TEST_INSTRUCTION = "instruction"; - private static final int TEST_REFILLS = 5; - - @Test - public void test() { - final AbdClaim claim = new AbdClaim(TEST_ICN, TEST_DIAG_CODE, TEST_CLAIM_ID); - - final AbdEvidence evidence = new AbdEvidence(); - - final AbdProcedure procedure = new AbdProcedure(); - procedure.setCode(TEST_CODE); - procedure.setCodeSystem(TEST_CODESYSTEM); - procedure.setPerformedDate(TEST_DATE); - procedure.setStatus(TEST_STATUS); - procedure.setText(TEST_TEXT); - - AbdCondition condition = new AbdCondition(); - condition.setCode(TEST_CODE); - condition.setStatus(TEST_STATUS); - condition.setAbatementDate(TEST_DATE); - condition.setText(TEST_TEXT); - condition.setOnsetDate(TEST_DATE); - - AbdMedication medication = new AbdMedication(); - medication.setDescription(TEST_TEXT); - medication.setAuthoredOn(TEST_DATE); - medication.setDuration(TEST_DURATION); - medication.setNotes(Collections.singletonList(TEST_TEXT)); - medication.setRefills(TEST_REFILLS); - medication.setRoute(TEST_ROUTE); - medication.setDosageInstructions(Collections.singletonList(TEST_INSTRUCTION)); - - AbdBloodPressure bloodPressure = new AbdBloodPressure(); - - evidence.setConditions(Collections.singletonList(condition)); - evidence.setProcedures(Collections.singletonList(procedure)); - evidence.setMedications(Collections.singletonList(medication)); - evidence.setBloodPressures(Collections.singletonList(bloodPressure)); - - final AbdResponse resp1 = new AbdResponse(); - final AbdResponse resp2 = new AbdResponse(claim); - final AbdResponse resp3 = new AbdResponse(claim, evidence); - final AbdResponse resp4 = new AbdResponse(claim, TEST_TEXT); - - assertNull(resp1.getDiagnosticCode()); - assertNull(resp1.getVeteranIcn()); - assertNull(resp1.getErrorMessage()); - assertNull(resp1.getEvidence()); - - assertEquals(TEST_ICN, resp2.getVeteranIcn()); - assertEquals(TEST_DIAG_CODE, resp2.getDiagnosticCode()); - assertNull(resp2.getErrorMessage()); - assertNull(resp2.getEvidence()); - - assertEquals(resp2.getDiagnosticCode(), resp3.getDiagnosticCode()); - assertEquals(resp2.getVeteranIcn(), resp3.getVeteranIcn()); - assertNotNull(resp3.getEvidence()); - assertEquals(medication, resp3.getEvidence().getMedications().get(0)); - assertEquals(bloodPressure, resp3.getEvidence().getBloodPressures().get(0)); - assertEquals(procedure, resp3.getEvidence().getProcedures().get(0)); - assertEquals(condition, resp3.getEvidence().getConditions().get(0)); - - assertEquals(TEST_TEXT, resp4.getErrorMessage()); - } -} diff --git a/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/service/FhirClientTest.java b/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/service/FhirClientTest.java deleted file mode 100644 index 457d44f8bb..0000000000 --- a/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/service/FhirClientTest.java +++ /dev/null @@ -1,241 +0,0 @@ -package gov.va.vro.abddataaccess.service; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.parser.IParser; -import ca.uhn.fhir.rest.api.EncodingEnum; -import gov.va.vro.abddataaccess.config.properties.LighthouseProperties; -import gov.va.vro.abddataaccess.exception.AbdException; -import gov.va.vro.abddataaccess.model.AbdBloodPressure; -import gov.va.vro.abddataaccess.model.AbdClaim; -import gov.va.vro.abddataaccess.model.AbdCondition; -import gov.va.vro.abddataaccess.model.AbdEvidence; -import gov.va.vro.abddataaccess.model.AbdMedication; -import gov.va.vro.abddataaccess.model.AbdProcedure; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; -import org.hl7.fhir.r4.model.Bundle; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.ArgumentMatchers; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.junit.jupiter.MockitoExtension; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpMethod; -import org.springframework.http.ResponseEntity; -import org.springframework.test.context.ActiveProfiles; -import org.springframework.web.client.RestTemplate; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** - * Unit tests for FhirClient. - * - * @author warren @Date 8/30/22 - */ -@ExtendWith(MockitoExtension.class) -@Slf4j -@ActiveProfiles("test") -class FhirClientTest { - @AllArgsConstructor - @Getter - private static class BundleInfo { - private Bundle bundle; - private String responseBody; - - private static Bundle getMedicalInfoBundle(String filename) throws IOException { - File initialFile = new File(filename); - InputStream theResponseInputStream = new FileInputStream(initialFile); - Bundle retVal = parser.parseResource(Bundle.class, theResponseInputStream); - theResponseInputStream.close(); - return retVal; - } - - public static BundleInfo getInstance(String resourceName) throws IOException { - Class clazz = FhirClientTest.class; - URL url = clazz.getClassLoader().getResource(resourceName); - - String file = Objects.requireNonNull(url).getPath(); - Bundle bundle = getMedicalInfoBundle(file); - String responseBody = new String(Files.readAllBytes(Paths.get(file))); - return new BundleInfo(bundle, responseBody); - } - } - - private static final String TEST_PATIENT = "9000682"; - private static final String TEST_DIAGNOSTIC_CODE = "7101"; - private static final String TEST_MEDICATION_REQUEST = "6602"; - private static final String TEST_CLAIM_ID = "1234"; - - private static final String CONTENT_TYPE = "application/fhir+json"; - private static final String MEDICATION_REQUEST_RESPONSE = "medication-response-bundle.json"; - private static final String OBSERVATION_RESPONSE = "observation-response-bundle.json"; - private static final String CONDITION_RESPONSE = "condition-response-bundle.json"; - private static final String PROCEDURE_RESPONSE = "procedure-response-bundle.json"; - private static final String EMPTY_RESPONSE = "empty-bundle.json"; - - private static final String FHIR_URL = "https://sandbox-api.va.gov/"; - - @InjectMocks private FhirClient client = Mockito.spy(new FhirClient()); - - @Mock private LighthouseApiService lighthouseApiService; - - @Mock private RestTemplate restTemplate; - - @Mock private LighthouseProperties properties; - - @Mock private IParser jsonParser; - - private static IParser parser; - - private static BundleInfo medBundleInfo; - private static BundleInfo bpBundleInfo; - private static BundleInfo conditionBundleInfo; - private static BundleInfo procedureBundleInfo; - private static BundleInfo emptyBundleInfo; - - @BeforeAll - private static void initVariables() throws IOException { - FhirContext fhirContext = FhirContext.forR4(); - EncodingEnum respType = EncodingEnum.forContentType(CONTENT_TYPE); - parser = respType.newParser(fhirContext); - - bpBundleInfo = BundleInfo.getInstance(OBSERVATION_RESPONSE); - medBundleInfo = BundleInfo.getInstance(MEDICATION_REQUEST_RESPONSE); - conditionBundleInfo = BundleInfo.getInstance(CONDITION_RESPONSE); - procedureBundleInfo = BundleInfo.getInstance(PROCEDURE_RESPONSE); - emptyBundleInfo = BundleInfo.getInstance(EMPTY_RESPONSE); - } - - private void mockRest(ResponseEntity resp, String domainName) { - Mockito.doReturn(resp) - .when(restTemplate) - .exchange( - ArgumentMatchers.contains(domainName), - ArgumentMatchers.eq(HttpMethod.GET), - ArgumentMatchers.any(HttpEntity.class), - ArgumentMatchers.eq(String.class)); - } - - @Test - public void testGetMedicalEvidence() throws AbdException { - AbdClaim testClaim = new AbdClaim(); - testClaim.setClaimSubmissionId(TEST_CLAIM_ID); - testClaim.setDiagnosticCode(TEST_MEDICATION_REQUEST); - testClaim.setVeteranIcn(TEST_PATIENT); - - Mockito.doReturn(FHIR_URL).when(properties).getFhirurl(); - Mockito.doReturn(medBundleInfo.getBundle()) - .when(jsonParser) - .parseResource(Bundle.class, medBundleInfo.getResponseBody()); - ResponseEntity medicationResp = ResponseEntity.ok(medBundleInfo.getResponseBody()); - mockRest(medicationResp, "MedicationRequest"); - AbdEvidence evidence = client.getMedicalEvidence(testClaim); - assertNotNull(evidence); - assertTrue(evidence.getMedications().size() > 0); - assertEquals(evidence.getMedications().size(), medBundleInfo.getBundle().getEntry().size()); - } - - @Test - public void testGetBloodPressure() throws AbdException { - AbdClaim testClaim = new AbdClaim(); - testClaim.setClaimSubmissionId(TEST_CLAIM_ID); - testClaim.setDiagnosticCode(TEST_DIAGNOSTIC_CODE); - testClaim.setVeteranIcn(TEST_PATIENT); - - Mockito.doReturn(FHIR_URL).when(properties).getFhirurl(); - Mockito.doReturn(medBundleInfo.getBundle()) - .when(jsonParser) - .parseResource(Bundle.class, medBundleInfo.getResponseBody()); - Mockito.doReturn(bpBundleInfo.getBundle()) - .when(jsonParser) - .parseResource(Bundle.class, bpBundleInfo.getResponseBody()); - Mockito.doReturn(conditionBundleInfo.getBundle()) - .when(jsonParser) - .parseResource(Bundle.class, conditionBundleInfo.getResponseBody()); - ResponseEntity medicationResp = ResponseEntity.ok(medBundleInfo.getResponseBody()); - ResponseEntity bpResp = ResponseEntity.ok(bpBundleInfo.getResponseBody()); - ResponseEntity conditionResp = ResponseEntity.ok(conditionBundleInfo.getResponseBody()); - mockRest(medicationResp, "MedicationRequest"); - mockRest(bpResp, "Observation"); - mockRest(conditionResp, "Condition"); - AbdEvidence evidence = client.getMedicalEvidence(testClaim); - assertNotNull(evidence); - - assertTrue(evidence.getBloodPressures().size() > 0); - assertEquals(evidence.getBloodPressures().size(), bpBundleInfo.getBundle().getEntry().size()); - } - - @Test - public void testGetAbdEvidence() { - Map> domainBundles = new HashMap<>(); - - Bundle medBundle = medBundleInfo.getBundle(); - assertNotNull(medBundle); - domainBundles.put(AbdDomain.MEDICATION, medBundle.getEntry()); - - Bundle bpBundle = bpBundleInfo.getBundle(); - assertNotNull(bpBundle); - domainBundles.put(AbdDomain.BLOOD_PRESSURE, bpBundle.getEntry()); - - Bundle conditionBundle = conditionBundleInfo.getBundle(); - assertNotNull(conditionBundle); - domainBundles.put(AbdDomain.CONDITION, conditionBundle.getEntry()); - - Bundle procedureBundle = procedureBundleInfo.getBundle(); - assertNotNull(procedureBundle); - domainBundles.put(AbdDomain.PROCEDURE, procedureBundle.getEntry()); - - AbdEvidence evidence = client.getAbdEvidence(domainBundles); - assertNotNull(evidence); - List medications = evidence.getMedications(); - assertNotNull(medications); - List bp = evidence.getBloodPressures(); - assertNotNull(bp); - List conditions = evidence.getConditions(); - assertNotNull(conditions); - List procedures = evidence.getProcedures(); - assertNotNull(procedures); - } - - private static void checkNotNullButEmpty(List list) { - assertNotNull(list); - assertTrue(list.isEmpty()); - } - - @Test - public void testMedicalEvidenceEmptyBundles() throws AbdException { - Mockito.doReturn("token") - .when(lighthouseApiService) - .getLighthouseToken(Mockito.any(), Mockito.any()); - - Mockito.doReturn(emptyBundleInfo.getBundle()) - .when(client) - .getFhirBundle(Mockito.any(), Mockito.any()); - - AbdClaim claim = new AbdClaim("1234", "0", "34"); - AbdEvidence evidence = client.getMedicalEvidence(claim); - - checkNotNullButEmpty(evidence.getBloodPressures()); - checkNotNullButEmpty(evidence.getMedications()); - checkNotNullButEmpty(evidence.getConditions()); - checkNotNullButEmpty(evidence.getProcedures()); - } -} diff --git a/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/service/FieldExtractorTest.java b/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/service/FieldExtractorTest.java deleted file mode 100644 index 9e5a94c66e..0000000000 --- a/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/service/FieldExtractorTest.java +++ /dev/null @@ -1,253 +0,0 @@ -package gov.va.vro.abddataaccess.service; - -import static gov.va.vro.abddataaccess.service.FieldExtractor.getValidCoding; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.fail; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.parser.IParser; -import ca.uhn.fhir.rest.api.EncodingEnum; -import gov.va.vro.abddataaccess.model.AbdBloodPressure; -import gov.va.vro.abddataaccess.model.AbdCondition; -import gov.va.vro.abddataaccess.model.AbdMedication; -import gov.va.vro.abddataaccess.model.AbdProcedure; -import lombok.extern.slf4j.Slf4j; -import org.hl7.fhir.r4.model.Bundle; -import org.hl7.fhir.r4.model.CodeableConcept; -import org.hl7.fhir.r4.model.Coding; -import org.hl7.fhir.r4.model.Condition; -import org.hl7.fhir.r4.model.MedicationRequest; -import org.hl7.fhir.r4.model.Observation; -import org.hl7.fhir.r4.model.Procedure; -import org.hl7.fhir.r4.model.Quantity; -import org.hl7.fhir.r4.model.Reference; -import org.hl7.fhir.r4.model.ResourceType; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.List; -import java.util.Objects; -import java.util.Optional; - -/** - * Unit tests for FieldExtractor. - * - * @author warren @Date 8/30/22 - */ -@Slf4j -class FieldExtractorTest { - - private static final String CONTENT_TYPE = "application/fhir+json"; - private static final String MEDICATION_REQUEST_RESPONSE = "medication-response-bundle.json"; - private static final String OBSERVATION_RESPONSE = "observation-response-bundle.json"; - private static final String PROCEDURE_RESPONSE = "procedure-response-bundle.json"; - private static final String CONDITION_RESPONSE = "condition-response-bundle.json"; - private static final String TEST = "bloodpresure-measurement-test.json"; - - private IParser parser; - - @BeforeEach - void setUp() { - FhirContext fhirContext = FhirContext.forR4(); - EncodingEnum respType = EncodingEnum.forContentType(CONTENT_TYPE); - parser = respType.newParser(fhirContext); - } - - @Test - public void testExtractCondition() { - log.info("test ExtractCondition"); - - try { - Bundle retVal = getBundle(CONDITION_RESPONSE); - List entries = retVal.getEntry(); - assertTrue(entries.size() > 1); - - entries.parallelStream().forEach(this::verifyCondition); - } catch (Exception e) { - log.error("testExtractCondition error: {}", e.getMessage(), e); - fail("testExtractCondition."); - } - } - - @Test - public void testExtractMedication() { - log.info("test testExtractMedication"); - try { - Bundle retVal = getBundle(MEDICATION_REQUEST_RESPONSE); - List entries = retVal.getEntry(); - assertTrue(entries.size() > 1); - - entries.parallelStream().forEach(this::verifyAbdMedication); - } catch (Exception e) { - log.error("testExtractMedication error: {}", e.getMessage(), e); - fail("text extractmedication."); - } - } - - @Test - public void testExtractProcedure() { - log.info("test ExtractProcedure"); - try { - Bundle retVal = getBundle(PROCEDURE_RESPONSE); - List entries = retVal.getEntry(); - assertTrue(entries.size() > 1); - - entries.parallelStream().forEach(this::verifyProcedure); - } catch (Exception e) { - log.error("ExtractProcedure error: {}", e.getMessage(), e); - fail("text ExtractProcedure."); - } - } - - @Test - public void testExtractBloodPressure() { - log.info("test ExtractBloodPressure"); - try { - Bundle retVal = getBundle(OBSERVATION_RESPONSE); - List entries = retVal.getEntry(); - assertTrue(entries.size() > 1); - - entries.parallelStream().forEach(this::verifyBloodPressure); - } catch (Exception e) { - log.error("testExtractBloodPressure error: {}", e.getMessage(), e); - fail("testExtractBloodPressure."); - } - } - - @Test - public void testBloodPressureMeasurement() { - log.info("test BloodPressureMeasurement"); - try { - Bundle bundle = getBundle(TEST); - List entries = bundle.getEntry(); - bundle - .getEntry() - .forEach( - e -> { - Observation o = (Observation) e.getResource(); - o.getComponent() - .forEach( - c -> { - if (!c.hasValueQuantity()) { - Quantity quantity = new Quantity(); - quantity.setUnit("mm[Hg]"); - String code = c.getCode().getCodingFirstRep().getCode(); - if (code.equals("8462-4")) { - quantity.setValue(80); - c.setValue(quantity); - } else if (code.equals("8480-6")) { - quantity.setValue(120); - c.setValue(quantity); - } - } - }); - }); - entries.parallelStream().forEach(this::verifyBloodPressure); - } catch (Exception e) { - log.error("testBloodPressureMeasurement error: {}", e.getMessage(), e); - fail("testBloodPressureMeasurement."); - } - } - - private Bundle getBundle(String conditionResponse) throws IOException { - String testfile = - Objects.requireNonNull(getClass().getClassLoader().getResource(conditionResponse)) - .getPath(); - File initialFile = new File(testfile); - InputStream theResponseInputStream = new FileInputStream(initialFile); - Bundle retVal = parser.parseResource(Bundle.class, theResponseInputStream); - theResponseInputStream.close(); - return retVal; - } - - private void verifyAbdMedication(Bundle.BundleEntryComponent entry) { - MedicationRequest resource = (MedicationRequest) entry.getResource(); - AbdMedication abdMedication = FieldExtractor.extractMedication(resource); - assertEquals(ResourceType.MedicationRequest, resource.getResourceType()); - assertEquals(resource.getStatus().toCode(), abdMedication.getStatus().toLowerCase()); - assertEquals(resource.hasNote(), !abdMedication.getNotes().isEmpty()); - assertEquals(resource.hasAuthoredOn(), !abdMedication.getAuthoredOn().isBlank()); - assertEquals(resource.hasMedicationReference(), !abdMedication.getDescription().isBlank()); - } - - private void verifyBloodPressure(Bundle.BundleEntryComponent entry) { - Observation resource = (Observation) entry.getResource(); - AbdBloodPressure abdBloodPressure = FieldExtractor.extractBloodPressure(resource); - assertEquals(ResourceType.Observation, resource.getResourceType()); - assertEquals(resource.hasEffectiveDateTimeType(), abdBloodPressure.getDate() != null); - // test blood presure reading - if (resource.hasPerformer()) { - List references = - resource.getPerformer().stream() - .filter(p -> p.hasReference() & p.hasDisplay()) - .map(Reference::getReference) - .toList(); - if (!references.isEmpty()) { - boolean hasPractitioner = references.stream().anyMatch(r -> r.contains("Practitioner")); - boolean hasOrganization = references.stream().anyMatch(r -> r.contains("Organization")); - if (hasPractitioner) { - assertFalse(abdBloodPressure.getPractitioner().isEmpty()); - } - if (hasOrganization) { - assertFalse(abdBloodPressure.getOrganization().isEmpty()); - } - } - } - } - - private void verifyProcedure(Bundle.BundleEntryComponent entry) { - Procedure procedure = (Procedure) entry.getResource(); - assertEquals(ResourceType.Procedure, procedure.getResourceType()); - AbdProcedure abdProcedure = FieldExtractor.extractProcedure(procedure); - assertEquals( - procedure.hasStatus(), !Optional.ofNullable(abdProcedure.getStatus()).orElse("").isEmpty()); - assertEquals( - procedure.hasCode(), !Optional.ofNullable(abdProcedure.getCode()).orElse("").isEmpty()); - } - - private void verifyCondition(Bundle.BundleEntryComponent entry) { - Condition condition = (Condition) entry.getResource(); - assertEquals(ResourceType.Condition, condition.getResourceType()); - AbdCondition abdCondition = FieldExtractor.extractCondition(condition); - log.info("abdCondition: {}", abdCondition.getText()); - if (condition.hasCode()) { - CodeableConcept codeableConcept = condition.getCode(); - Coding coding = getValidCoding(codeableConcept); - if (coding != null) { - assertEquals( - Optional.ofNullable(coding.getCode()).orElse(""), - Optional.ofNullable(abdCondition.getCode()).orElse("")); - if (coding.hasDisplay()) { - assertEquals(coding.getDisplay(), abdCondition.getText()); - } - } - } - if (condition.hasAbatementDateTimeType()) { - assertEquals( - Optional.ofNullable(condition.getAbatementDateTimeType().asStringValue()) - .orElse("") - .isEmpty(), - abdCondition.getAbatementDate().isEmpty()); - } - if (condition.hasOnsetDateTimeType()) { - assertEquals( - Optional.ofNullable(condition.getOnsetDateTimeType().asStringValue()) - .orElse("") - .isEmpty(), - abdCondition.getOnsetDate().isEmpty()); - } - if (condition.hasRecordedDateElement()) { - assertEquals( - Optional.ofNullable(condition.getRecordedDateElement().asStringValue()) - .orElse("") - .isEmpty(), - abdCondition.getRecordedDate().isEmpty()); - } - } -} diff --git a/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/service/LighthouseApiServiceTest.java b/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/service/LighthouseApiServiceTest.java deleted file mode 100644 index 8c940c39ac..0000000000 --- a/svc-lighthouse-api/src/test/java/gov/va/vro/abddataaccess/service/LighthouseApiServiceTest.java +++ /dev/null @@ -1,97 +0,0 @@ -package gov.va.vro.abddataaccess.service; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.fail; - -import com.fasterxml.jackson.databind.ObjectMapper; -import gov.va.vro.abddataaccess.config.properties.LighthouseProperties; -import gov.va.vro.abddataaccess.exception.AbdException; -import gov.va.vro.abddataaccess.model.LighthouseTokenMessage; -import lombok.extern.slf4j.Slf4j; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.ArgumentMatchers; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.junit.jupiter.MockitoExtension; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.http.HttpEntity; -import org.springframework.http.ResponseEntity; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.web.client.RestTemplate; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.Objects; - -/** - * Unit tests for LighthouseApiService. - * - * @author warren @Date 8/30/22 - */ -@ExtendWith(SpringExtension.class) -@EnableConfigurationProperties -@ContextConfiguration(classes = LighthouseProperties.class) -@TestPropertySource({"classpath:application.yaml", "classpath:application-test.yaml"}) -@ExtendWith(MockitoExtension.class) -@Slf4j -class LighthouseApiServiceTest { - - private static final String TEST_PATIENT = "9000682"; - private static final String TEST_TOKEN = "lighthouseToken.json"; - - @Mock private RestTemplate restTemplate; - - @Autowired private LighthouseProperties lhProps; - - private LighthouseTokenMessage testToken; - - private void setupMocking() { - - try { - String filename = - Objects.requireNonNull(getClass().getClassLoader().getResource(TEST_TOKEN)).getPath(); - Path tokenFilePath = Path.of(filename); - String token = Files.readString(tokenFilePath); - - ResponseEntity resp = ResponseEntity.ok(token); - - Mockito.doReturn(resp) - .when(restTemplate) - .postForEntity( - ArgumentMatchers.eq(lhProps.getTokenurl()), - ArgumentMatchers.any(HttpEntity.class), - ArgumentMatchers.eq(String.class)); - - ObjectMapper mapper = new ObjectMapper(); - testToken = mapper.readValue(token, LighthouseTokenMessage.class); - } catch (IOException e) { - log.error("Failed to parse lighthouse token message.", e); - fail("Mocking"); - } catch (NullPointerException e) { - log.error("Failed to get file path.", e); - fail("Mocking"); - } - } - - @Test - public void testGetLighthouseToken() throws AbdException { - LighthouseApiService service = new LighthouseApiService(lhProps, restTemplate); - setupMocking(); - String resp = service.getLighthouseToken(AbdDomain.BLOOD_PRESSURE, TEST_PATIENT); - assertEquals(testToken.getTokenType() + " " + testToken.getAccessToken(), resp); - } - - @Test - public void testScope() { - for (AbdDomain domain : AbdDomain.values()) { - log.info(domain.getScope()); - assertTrue(domain.getScope().startsWith("launch patient")); - } - } -} diff --git a/svc-lighthouse-api/src/test/resources/application-test.yaml b/svc-lighthouse-api/src/test/resources/application-test.yaml deleted file mode 100644 index 8ef7d14f90..0000000000 --- a/svc-lighthouse-api/src/test/resources/application-test.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# When @ActiveProfiles("test") is used, application.properties and application-nonprod.properties -# are loaded due to Spring Profiles configured in application.properties, then this file is loaded - -# Not used: lh.clientId - -lh.pemkey: -----BEGIN RSA PRIVATE KEY-----\n\ - MIIEpAIBAAKCAQEA2a7LnzMhQBK1bFqfAvTdaT3EAelAjzHsgBaTSOkCBWQc7xg+\n\ - Ee8OiFZzSfrjbu4O9hlOeHeQGXI1ighJzx3TMQNaTEyuBzimBOgkwLPLU2zbvr0v\n\ - bHnQ+XCMzXge74+p0A2fAw6v9rIDPCVgG8t6K5WtonQiTERqt6rlXDZ22GWLU3n+\n\ - ngp46JN2o0ZeC9UbHQwonXpzrdL2WvNroD7t+Tx8PdwpvTm6EtfEPzx8ckRFh8Z1\n\ - r5jqj4GY68FWl+v33tkalmIMrck1pTjU58O2VkOE9BdM0KYWootEeASWKg2SU32E\n\ - bgtozVRPoTndzXrjKrLq7Q+BnGAohVX9HAFEyQIDAQABAoIBAQDKkeIFDTSlBoP0\n\ - CESvIKUmOYc8bA5a8w9thxSapdLup2JRkVK5p6fzcdepgaLB6SDdHWGrsz/Snjh6\n\ - cgoVhmCw3LjcBgNwzuOX71u8Q9QzlzrKvgzyuk2gwn8U+fJ35k4VQYe29aUEQlXG\n\ - U9WjJ/BRvOEvKzl7lbNlpc/4xupDpkuZqbSNosyFWDjBC8nB1iRj5bi1HK5vQF3P\n\ - 7Ic+9fjq1vkklMvBtaSwrV0cWznk6SqfDXK+UpkLTv6kr4N1cvHUxQE4jqCFVU2g\n\ - XwuKGoFayw0C+1qJJ5nNtLYs29eg/K0e3y9imsVai981turuG+NFC3FCv1hZTor/\n\ - SHL5kJFtAoGBAPVN22uk3CMTNejcw6R6ectQBa09M6LZaasVEnhQfF5j+BwjG8+t\n\ - F7lJHuvWNS5x4zv33da3Y+SvI782ag9poeesF89NrfrEaD8Is60W+adoMdqQ7IlG\n\ - 8rlhYW4Tc98IVJ7+kmg9IkjaF665FOIxqlkgVLMOZAaf8vSvnZHOtIDTAoGBAOMs\n\ - n1U95hB0ZKjzHc5+lu30TDkIkNjHwZ64aMN6SP6FzKFNwcGv/BjQVDENcHiAc8cI\n\ - gG7Mdlt4bNG/MBjOQ1EIGX1/am9gPCinDadrFLPdmZ1VKHcuXkuqTZsZX5Ji8qvm\n\ - CX7ely3bAu3b93YQylM9rCmY3Gc5oekhb2NQV0JzAoGBAJzeWzEtTjGH+XOeqeYn\n\ - BHgGBntQphLAIhjr8tHJ9p6OI34q3YAjWwZ8Qi/i3kODRSN2UQEcad82OQ/whkaw\n\ - 8H6syNUjAd1ZeKjGsdBA3wo1UZxKDVmEa3gtVBcGjZTVSPgcKBhM7/3Sqk5rwXUc\n\ - +ajhSgjvbPvnkYD0RTmXDEtNAoGAD7hLwkNJQ0Q6nvJL0rkxyn+IMr4j/8w62rfa\n\ - EATLPkmV8meGC9gYssLfwJE0gjIpUNGGyaP+YLABn7YCJwVG5TmRQfzqKZDYONvu\n\ - dvJS+WtRMPDunuinf8bmHeBwm5mbP0foyk2u2m54UmtRQWtCBOaUnkBEqCP1z0MQ\n\ - CShLEX8CgYAI4ZboDU6SnR7jUGxDlVQMQz6+et/Xpc/bt7z6FcRDExbpqkN1qPze\n\ - lkqFEivH0ol5gqIgM09lhuKkZBkALoOHDVyD5c0c9hzkEztOdhIIfYYifI/+GK/y\n\ - wNvBzQXmbHJ+vpLcOAluJ7X2qa/wNuNUtKKgiVgj0V+GMo0dhtT+PQ==\n\ - -----END RSA PRIVATE KEY----- diff --git a/svc-lighthouse-api/src/test/resources/bloodpresure-measurement-test.json b/svc-lighthouse-api/src/test/resources/bloodpresure-measurement-test.json deleted file mode 100644 index 3c812b6c19..0000000000 --- a/svc-lighthouse-api/src/test/resources/bloodpresure-measurement-test.json +++ /dev/null @@ -1,239 +0,0 @@ -{ - "resourceType": "Bundle", - "type": "searchset", - "total": 76, - "link": [ - { - "relation": "first", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/Observation?patient=9000682&_count=30&page=1" - }, - { - "relation": "self", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/Observation?patient=9000682&_count=30&page=1" - }, - { - "relation": "next", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/Observation?patient=9000682&_count=30&page=2" - }, - { - "relation": "last", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/Observation?patient=9000682&_count=30&page=3" - } - ], - "entry": [ - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Observation/I2-2UJ2JQNBO74LQ2RN5PCK4RAZ4A000000", - "resource": { - "resourceType": "Observation", - "id": "I2-2UJ2JQNBO74LQ2RN5PCK4RAZ4A000000", - "meta": { - "lastUpdated": "2009-04-18T12:24:55Z" - }, - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/observation-category", - "code": "vital-signs", - "display": "Vital Signs" - } - ], - "text": "Vital Signs" - } - ], - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "85354-9", - "display": "Blood pressure systolic and diastolic" - } - ], - "text": "Blood pressure systolic and diastolic" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": "2009-03-19T12:24:55Z", - "issued": "2009-03-19T12:24:55Z", - "result": null, - "performer": [ - { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Organization/I2-TYIC2AW2NXNADER4SKRKJQZWRE000000", - "display": "LYONS VA MEDICAL CENTER" - }, - { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-HRJI2MVST2IQSPR7U5SACWIWZA000000", - "display": "DR. JANE460 DOE922 MD" - } - ], - "component": [ - { - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "8480-6", - "display": "Systolic blood pressure" - } - ], - "text": "Systolic blood pressure" - }, - "valueQuantity": { - "value": 131, - "unit": "mm[Hg]", - "system": "http://unitsofmeasure.org", - "code": "mm[Hg]" - }, - "valueCodeableConcept": null, - "valueString": null, - "valueInteger": 0, - "valueRange": null - }, - { - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "8462-4", - "display": "Diastolic blood pressure" - } - ], - "text": "Diastolic blood pressure" - }, - "valueQuantity": { - "value": 83, - "unit": "mm[Hg]", - "system": "http://unitsofmeasure.org", - "code": "mm[Hg]" - }, - "valueCodeableConcept": null, - "valueString": null, - "valueInteger": 0, - "valueRange": null - } - ], - "text": null, - "valueQuantity": null, - "interpretation": null, - "referenceRange": null, - "valueCodeableConcept": null, - "valueString": null, - "valueInteger": 0, - "valueRange": null - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Observation/I2-N6FXZLRAEOMUZNCKS4RPK7RSZM000000", - "resource": { - "resourceType": "Observation", - "id": "I2-N6FXZLRAEOMUZNCKS4RPK7RSZM000000", - "meta": { - "lastUpdated": "2010-04-24T12:24:55Z" - }, - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/observation-category", - "code": "vital-signs", - "display": "Vital Signs" - } - ], - "text": "Vital Signs" - } - ], - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "85354-9", - "display": "Blood pressure systolic and diastolic" - } - ], - "text": "Blood pressure systolic and diastolic" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": "2010-03-25T12:24:55Z", - "issued": "2010-03-25T12:24:55Z", - "result": null, - "performer": [ - { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Organization/I2-AKOTGEFSVKFJOPUKHIVJAH5VQU000000", - "display": "NEW AMSTERDAM CBOC" - }, - { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-4ZXYC2SQAZCHMOWPPFNLOY65GE000000", - "display": "DR. THOMAS359 REYNOLDS206 PHD" - } - ], - "component": [ - { - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "8480-6", - "display": "Systolic blood pressure" - } - ], - "text": "Systolic blood pressure" - }, - "valueQuantity": { - "value": 138, - "unit": "mm[Hg]", - "system": "http://unitsofmeasure.org", - "code": "mm[Hg]" - }, - "valueCodeableConcept": null, - "valueString": null, - "valueInteger": 0, - "valueRange": null - }, - { - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "8462-4", - "display": "Diastolic blood pressure" - } - ], - "text": "Diastolic blood pressure" - }, - "valueQuantity": { - "value": 82, - "unit": "mm[Hg]", - "system": "http://unitsofmeasure.org", - "code": "mm[Hg]" - }, - "valueCodeableConcept": null, - "valueString": null, - "valueInteger": 0, - "valueRange": null - } - ], - "text": null, - "valueQuantity": null, - "interpretation": null, - "referenceRange": null, - "valueCodeableConcept": null, - "valueString": null, - "valueInteger": 0, - "valueRange": null - }, - "search": { - "mode": "match" - } - } - ] -} diff --git a/svc-lighthouse-api/src/test/resources/condition-response-bundle.json b/svc-lighthouse-api/src/test/resources/condition-response-bundle.json deleted file mode 100644 index 9350436d38..0000000000 --- a/svc-lighthouse-api/src/test/resources/condition-response-bundle.json +++ /dev/null @@ -1,1026 +0,0 @@ -{ - "resourceType": "Bundle", - "type": "searchset", - "total": 14, - "link": [ - { - "relation": "first", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition?patient=9000682&_count=30&page=1" - }, - { - "relation": "self", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition?patient=9000682&_count=30&page=1" - }, - { - "relation": "last", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition?patient=9000682&_count=30&page=1" - } - ], - "entry": [ - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition/I2-LBGN4FGCN6ENTBMUOS52YXQWHU000000", - "resource": { - "resourceType": "Condition", - "id": "I2-LBGN4FGCN6ENTBMUOS52YXQWHU000000", - "meta": { - "lastUpdated": "1953-04-12T12:24:55Z" - }, - "status": null, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-category", - "code": "encounter-diagnosis", - "display": "Encounter Diagnosis" - } - ], - "text": "Encounter Diagnosis" - } - ], - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "367498001", - "display": "Seasonal allergic rhinitis" - } - ], - "text": "Seasonal allergic rhinitis" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "clinicalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "active", - "display": "Active" - } - ], - "text": "Active" - }, - "verificationStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", - "code": "provisional", - "display": "Provisional" - } - ], - "text": "Provisional" - }, - "onsetDateTime": "1953-04-12T12:24:55Z", - "abatementDateTime": null, - "recordedDate": "1953-04-12", - "recorder": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-HRJI2MVST2IQSPR7U5SACWIWZA000000", - "display": "DR. JANE460 DOE922 MD" - }, - "asserter": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-HRJI2MVST2IQSPR7U5SACWIWZA000000", - "display": "DR. JANE460 DOE922 MD" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition/I2-STILZF2NDUG6UIDF2QPD27OUUY000000", - "resource": { - "resourceType": "Condition", - "id": "I2-STILZF2NDUG6UIDF2QPD27OUUY000000", - "meta": { - "lastUpdated": "1953-04-12T12:24:55Z" - }, - "status": null, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-category", - "code": "problem-list-item", - "display": "Problem List Item" - } - ], - "text": "Problem List Item" - } - ], - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "367498001", - "display": "Seasonal allergic rhinitis" - } - ], - "text": "Seasonal allergic rhinitis" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "clinicalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "active", - "display": "Active" - } - ], - "text": "Active" - }, - "verificationStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", - "code": "confirmed", - "display": "Confirmed" - } - ], - "text": "Confirmed" - }, - "onsetDateTime": "1953-04-12T12:24:55Z", - "abatementDateTime": null, - "recordedDate": "1953-04-12", - "recorder": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-4ZXYC2SQAZCHMOWPPFNLOY65GE000000", - "display": "DR. THOMAS359 REYNOLDS206 PHD" - }, - "asserter": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-4ZXYC2SQAZCHMOWPPFNLOY65GE000000", - "display": "DR. THOMAS359 REYNOLDS206 PHD" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition/I2-JP7BWLUQKVUAUYS6O2THOIL2AI000000", - "resource": { - "resourceType": "Condition", - "id": "I2-JP7BWLUQKVUAUYS6O2THOIL2AI000000", - "meta": { - "lastUpdated": "1968-04-14T12:24:55Z" - }, - "status": null, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-category", - "code": "encounter-diagnosis", - "display": "Encounter Diagnosis" - } - ], - "text": "Encounter Diagnosis" - } - ], - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "40055000", - "display": "Chronic sinusitis (disorder)" - }, - { - "system": "http://hl7.org/fhir/sid/icd-10-cm", - "code": "J01.21", - "display": "Acute recurrent ethmoidal sinusitis" - } - ], - "text": "Chronic sinusitis (disorder)" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "clinicalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "active", - "display": "Active" - } - ], - "text": "Active" - }, - "verificationStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", - "code": "confirmed", - "display": "Confirmed" - } - ], - "text": "Confirmed" - }, - "onsetDateTime": "1968-04-14T12:24:55Z", - "abatementDateTime": null, - "recordedDate": "1968-04-14", - "recorder": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-4ZXYC2SQAZCHMOWPPFNLOY65GE000000", - "display": "DR. THOMAS359 REYNOLDS206 PHD" - }, - "asserter": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-4ZXYC2SQAZCHMOWPPFNLOY65GE000000", - "display": "DR. THOMAS359 REYNOLDS206 PHD" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition/I2-5I4RHYODT7XPDFWMB4OXECSGRM000000", - "resource": { - "resourceType": "Condition", - "id": "I2-5I4RHYODT7XPDFWMB4OXECSGRM000000", - "meta": { - "lastUpdated": "1968-04-14T12:24:55Z" - }, - "status": null, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-category", - "code": "problem-list-item", - "display": "Problem List Item" - } - ], - "text": "Problem List Item" - } - ], - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "40055000", - "display": "Chronic sinusitis (disorder)" - }, - { - "system": "http://hl7.org/fhir/sid/icd-10-cm", - "code": "J01.21", - "display": "Acute recurrent ethmoidal sinusitis" - } - ], - "text": "Chronic sinusitis (disorder)" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "clinicalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "active", - "display": "Active" - } - ], - "text": "Active" - }, - "verificationStatus": null, - "onsetDateTime": "1968-04-14T12:24:55Z", - "abatementDateTime": null, - "recordedDate": "1968-04-14", - "recorder": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-HRJI2MVST2IQSPR7U5SACWIWZA000000", - "display": "DR. JANE460 DOE922 MD" - }, - "asserter": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-HRJI2MVST2IQSPR7U5SACWIWZA000000", - "display": "DR. JANE460 DOE922 MD" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition/I2-VDDSXGU7TQMGVISFT43QMIMRDY000000", - "resource": { - "resourceType": "Condition", - "id": "I2-VDDSXGU7TQMGVISFT43QMIMRDY000000", - "meta": { - "lastUpdated": "1978-12-14T13:24:55Z" - }, - "status": null, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-category", - "code": "encounter-diagnosis", - "display": "Encounter Diagnosis" - } - ], - "text": "Encounter Diagnosis" - } - ], - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "162864005", - "display": "Body mass index 30+ - obesity (finding)" - }, - { - "system": "http://hl7.org/fhir/sid/icd-10-cm", - "code": "Z68.38", - "display": "Body mass index (BMI) 38.0-38.9, adult" - } - ], - "text": "Body mass index 30+ - obesity (finding)" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "clinicalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "active", - "display": "Active" - } - ], - "text": "Active" - }, - "verificationStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", - "code": "confirmed", - "display": "Confirmed" - } - ], - "text": "Confirmed" - }, - "onsetDateTime": "1978-12-14T13:24:55Z", - "abatementDateTime": null, - "recordedDate": "1978-12-14", - "recorder": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-QXZOEMHBZNNC7BUGOTHVWYSZAI000000", - "display": "DR. JOHN248 SMITH811 MD" - }, - "asserter": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-QXZOEMHBZNNC7BUGOTHVWYSZAI000000", - "display": "DR. JOHN248 SMITH811 MD" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition/I2-FP7QCOOYBZK7QTEFWDWTM2VOVU000000", - "resource": { - "resourceType": "Condition", - "id": "I2-FP7QCOOYBZK7QTEFWDWTM2VOVU000000", - "meta": { - "lastUpdated": "1978-12-14T13:24:55Z" - }, - "status": null, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-category", - "code": "problem-list-item", - "display": "Problem List Item" - } - ], - "text": "Problem List Item" - } - ], - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "162864005", - "display": "Body mass index 30+ - obesity (finding)" - }, - { - "system": "http://hl7.org/fhir/sid/icd-10-cm", - "code": "Z68.38", - "display": "Body mass index (BMI) 38.0-38.9, adult" - } - ], - "text": "Body mass index 30+ - obesity (finding)" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "clinicalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "active", - "display": "Active" - } - ], - "text": "Active" - }, - "verificationStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", - "code": "confirmed", - "display": "Confirmed" - } - ], - "text": "Confirmed" - }, - "onsetDateTime": "1978-12-14T13:24:55Z", - "abatementDateTime": null, - "recordedDate": "1978-12-14", - "recorder": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-4ZXYC2SQAZCHMOWPPFNLOY65GE000000", - "display": "DR. THOMAS359 REYNOLDS206 PHD" - }, - "asserter": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-4ZXYC2SQAZCHMOWPPFNLOY65GE000000", - "display": "DR. THOMAS359 REYNOLDS206 PHD" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition/I2-XXETOVD5EDWHOURRCSQOUUMJHM000000", - "resource": { - "resourceType": "Condition", - "id": "I2-XXETOVD5EDWHOURRCSQOUUMJHM000000", - "meta": { - "lastUpdated": "1995-09-21T12:24:55Z" - }, - "status": null, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-category", - "code": "encounter-diagnosis", - "display": "Encounter Diagnosis" - } - ], - "text": "Encounter Diagnosis" - } - ], - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "408512008", - "display": "Body mass index 40+ - severely obese (finding)" - } - ], - "text": "Body mass index 40+ - severely obese (finding)" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "clinicalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "active", - "display": "Active" - } - ], - "text": "Active" - }, - "verificationStatus": null, - "onsetDateTime": "1995-09-21T12:24:55Z", - "abatementDateTime": null, - "recordedDate": "1995-09-21", - "recorder": null, - "asserter": null - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition/I2-KHUNHKEKO4TZ4F4SNW5ARJDCCE000000", - "resource": { - "resourceType": "Condition", - "id": "I2-KHUNHKEKO4TZ4F4SNW5ARJDCCE000000", - "meta": { - "lastUpdated": "1995-09-21T12:24:55Z" - }, - "status": null, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-category", - "code": "problem-list-item", - "display": "Problem List Item" - } - ], - "text": "Problem List Item" - } - ], - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "408512008", - "display": "Body mass index 40+ - severely obese (finding)" - } - ], - "text": "Body mass index 40+ - severely obese (finding)" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "clinicalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "active", - "display": "Active" - } - ], - "text": "Active" - }, - "verificationStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", - "code": "provisional", - "display": "Provisional" - } - ], - "text": "Provisional" - }, - "onsetDateTime": "1995-09-21T12:24:55Z", - "abatementDateTime": null, - "recordedDate": "1995-09-21", - "recorder": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-QXZOEMHBZNNC7BUGOTHVWYSZAI000000", - "display": "DR. JOHN248 SMITH811 MD" - }, - "asserter": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-QXZOEMHBZNNC7BUGOTHVWYSZAI000000", - "display": "DR. JOHN248 SMITH811 MD" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition/I2-MDH7CK4VETOYJA7YUIME4B4O74000000", - "resource": { - "resourceType": "Condition", - "id": "I2-MDH7CK4VETOYJA7YUIME4B4O74000000", - "meta": { - "lastUpdated": "2009-08-04T12:24:55Z" - }, - "status": null, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-category", - "code": "encounter-diagnosis", - "display": "Encounter Diagnosis" - } - ], - "text": "Encounter Diagnosis" - } - ], - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "10509002", - "display": "Acute bronchitis (disorder)" - } - ], - "text": "Acute bronchitis (disorder)" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "clinicalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "resolved", - "display": "Resolved" - } - ], - "text": "Resolved" - }, - "verificationStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", - "code": "confirmed", - "display": "Confirmed" - } - ], - "text": "Confirmed" - }, - "onsetDateTime": "2009-08-04T12:24:55Z", - "abatementDateTime": "2009-08-11T12:24:55Z", - "recordedDate": "2009-08-04", - "recorder": null, - "asserter": null - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition/I2-ZFVHARYWMTZWWFYOPTST4YXQF4000000", - "resource": { - "resourceType": "Condition", - "id": "I2-ZFVHARYWMTZWWFYOPTST4YXQF4000000", - "meta": { - "lastUpdated": "2009-08-04T12:24:55Z" - }, - "status": null, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-category", - "code": "problem-list-item", - "display": "Problem List Item" - } - ], - "text": "Problem List Item" - } - ], - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "10509002", - "display": "Acute bronchitis (disorder)" - } - ], - "text": "Acute bronchitis (disorder)" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "clinicalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "resolved", - "display": "Resolved" - } - ], - "text": "Resolved" - }, - "verificationStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", - "code": "confirmed", - "display": "Confirmed" - } - ], - "text": "Confirmed" - }, - "onsetDateTime": "2009-08-04T12:24:55Z", - "abatementDateTime": "2009-08-11T12:24:55Z", - "recordedDate": "2009-08-04", - "recorder": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-4ZXYC2SQAZCHMOWPPFNLOY65GE000000", - "display": "DR. THOMAS359 REYNOLDS206 PHD" - }, - "asserter": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-4ZXYC2SQAZCHMOWPPFNLOY65GE000000", - "display": "DR. THOMAS359 REYNOLDS206 PHD" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition/I2-ZTU4W7VZHRQCLO6TSMDWFLVGA4000000", - "resource": { - "resourceType": "Condition", - "id": "I2-ZTU4W7VZHRQCLO6TSMDWFLVGA4000000", - "meta": { - "lastUpdated": "2012-11-16T13:24:55Z" - }, - "status": null, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-category", - "code": "encounter-diagnosis", - "display": "Encounter Diagnosis" - } - ], - "text": "Encounter Diagnosis" - } - ], - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "283385000", - "display": "Laceration of thigh" - } - ], - "text": "Laceration of thigh" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "clinicalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "resolved", - "display": "Resolved" - } - ], - "text": "Resolved" - }, - "verificationStatus": null, - "onsetDateTime": "2012-11-16T13:24:55Z", - "abatementDateTime": "2012-12-07T13:24:55Z", - "recordedDate": "2012-11-16", - "recorder": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-HRJI2MVST2IQSPR7U5SACWIWZA000000", - "display": "DR. JANE460 DOE922 MD" - }, - "asserter": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-HRJI2MVST2IQSPR7U5SACWIWZA000000", - "display": "DR. JANE460 DOE922 MD" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition/I2-XFDX47P5VEKX2C5JL5ZFYSOSTU000000", - "resource": { - "resourceType": "Condition", - "id": "I2-XFDX47P5VEKX2C5JL5ZFYSOSTU000000", - "meta": { - "lastUpdated": "2012-11-16T13:24:55Z" - }, - "status": null, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-category", - "code": "problem-list-item", - "display": "Problem List Item" - } - ], - "text": "Problem List Item" - } - ], - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "283385000", - "display": "Laceration of thigh" - } - ], - "text": "Laceration of thigh" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "clinicalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "inactive", - "display": "Inactive" - } - ], - "text": "Inactive" - }, - "verificationStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", - "code": "provisional", - "display": "Provisional" - } - ], - "text": "Provisional" - }, - "onsetDateTime": "2012-11-16T13:24:55Z", - "abatementDateTime": "2012-12-07T13:24:55Z", - "recordedDate": "2012-11-16", - "recorder": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-HRJI2MVST2IQSPR7U5SACWIWZA000000", - "display": "DR. JANE460 DOE922 MD" - }, - "asserter": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-HRJI2MVST2IQSPR7U5SACWIWZA000000", - "display": "DR. JANE460 DOE922 MD" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition/I2-5EIVNFS534Z6AFX2QWHACSQJIM000000", - "resource": { - "resourceType": "Condition", - "id": "I2-5EIVNFS534Z6AFX2QWHACSQJIM000000", - "meta": { - "lastUpdated": "2014-11-27T13:24:55Z" - }, - "status": null, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-category", - "code": "encounter-diagnosis", - "display": "Encounter Diagnosis" - } - ], - "text": "Encounter Diagnosis" - } - ], - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "403190006", - "display": "First degree burn" - } - ], - "text": "First degree burn" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "clinicalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "resolved", - "display": "Resolved" - } - ], - "text": "Resolved" - }, - "verificationStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", - "code": "confirmed", - "display": "Confirmed" - } - ], - "text": "Confirmed" - }, - "onsetDateTime": "2014-11-27T13:24:55Z", - "abatementDateTime": "2014-12-18T13:24:55Z", - "recordedDate": "2014-11-27", - "recorder": null, - "asserter": null - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Condition/I2-766QBT3JWLVLK5PKUMSRM2QZCU000000", - "resource": { - "resourceType": "Condition", - "id": "I2-766QBT3JWLVLK5PKUMSRM2QZCU000000", - "meta": { - "lastUpdated": "2014-11-27T13:24:55Z" - }, - "status": null, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-category", - "code": "problem-list-item", - "display": "Problem List Item" - } - ], - "text": "Problem List Item" - } - ], - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "403190006", - "display": "First degree burn" - } - ], - "text": "First degree burn" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "clinicalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "resolved", - "display": "Resolved" - } - ], - "text": "Resolved" - }, - "verificationStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", - "code": "confirmed", - "display": "Confirmed" - } - ], - "text": "Confirmed" - }, - "onsetDateTime": "2014-11-27T13:24:55Z", - "abatementDateTime": "2014-12-18T13:24:55Z", - "recordedDate": "2014-11-27", - "recorder": null, - "asserter": null - }, - "search": { - "mode": "match" - } - } - ] -} diff --git a/svc-lighthouse-api/src/test/resources/empty-bundle.json b/svc-lighthouse-api/src/test/resources/empty-bundle.json deleted file mode 100644 index c261265912..0000000000 --- a/svc-lighthouse-api/src/test/resources/empty-bundle.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "resourceType": "Bundle", - "type": "searchset", - "total": 0, - "link": [ - { - "relation": "first", - "url": "https://sandbox-api.va.gov/resource" - }, - { - "relation": "self", - "url": "https://sandbox-api.va.gov/resource" - }, - { - "relation": "last", - "url": "https://sandbox-api.va.gov/resource" - } - ], - "entry": [] -} diff --git a/svc-lighthouse-api/src/test/resources/expected-json/lh-patient01-7101.json b/svc-lighthouse-api/src/test/resources/expected-json/lh-patient01-7101.json deleted file mode 100644 index e1965541b5..0000000000 --- a/svc-lighthouse-api/src/test/resources/expected-json/lh-patient01-7101.json +++ /dev/null @@ -1,325 +0,0 @@ -{ - "medications": [ - { - "status": "Active", - "description": "Hydrochlorothiazide 6.25 MG", - "refills": 0, - "authoredOn": "1950-04-05T23:00:00Z", - "dosageInstructions": [ - "QD" - ], - "route": "ORAL" - }, - { - "status": "Active", - "notes": [ - "Hydrochlorothiazide 6.25 MG" - ], - "description": "Hydrochlorothiazide 6.25 MG", - "refills": 0, - "authoredOn": "1950-04-06T07:24:55Z", - "dosageInstructions": [ - "Once per day.", - "As directed by physician." - ], - "route": "As directed by physician." - }, - { - "status": "Active", - "description": "120 ACTUAT Fluticasone propionate 0.044 MG/ACTUAT Metered Dose Inhaler", - "refills": 0, - "authoredOn": "1952-04-11T23:00:00Z" - }, - { - "status": "Active", - "description": "200 ACTUAT Albuterol 0.09 MG/ACTUAT Metered Dose Inhaler", - "refills": 0, - "authoredOn": "1952-04-11T23:00:00Z", - "dosageInstructions": [ - "QID PRN" - ], - "route": "INHALATION ORAL" - }, - { - "status": "Active", - "notes": [ - "120 ACTUAT Fluticasone propionate 0.044 MG/ACTUAT Metered Dose Inhaler" - ], - "description": "120 ACTUAT Fluticasone propionate 0.044 MG/ACTUAT Metered Dose Inhaler", - "refills": 0, - "authoredOn": "1952-04-12T07:24:55Z", - "dosageInstructions": [ - "Once per day.", - "As directed by physician." - ], - "route": "As directed by physician." - }, - { - "status": "Active", - "notes": [ - "200 ACTUAT Albuterol 0.09 MG/ACTUAT Metered Dose Inhaler" - ], - "description": "200 ACTUAT Albuterol 0.09 MG/ACTUAT Metered Dose Inhaler", - "refills": 0, - "authoredOn": "1952-04-12T07:24:55Z", - "dosageInstructions": [ - "Once per day.", - "As directed by physician." - ], - "route": "As directed by physician." - }, - { - "status": "Active", - "description": "diphenhydrAMINE Hydrochloride 25 MG Oral Tablet", - "refills": 0, - "authoredOn": "1953-04-25T23:00:00Z" - }, - { - "status": "Active", - "notes": [ - "diphenhydrAMINE Hydrochloride 25 MG Oral Tablet" - ], - "description": "diphenhydrAMINE Hydrochloride 25 MG Oral Tablet", - "refills": 0, - "authoredOn": "1953-04-26T08:24:55Z", - "dosageInstructions": [ - "Once per day.", - "As directed by physician." - ], - "route": "As directed by physician." - }, - { - "status": "Completed", - "description": "Acetaminophen 160 MG", - "refills": 0, - "authoredOn": "2009-08-04T00:00:00Z" - }, - { - "status": "Active", - "notes": [ - "Acetaminophen 160 MG" - ], - "description": "Acetaminophen 160 MG", - "refills": 0, - "authoredOn": "2009-08-04T08:24:55Z", - "dosageInstructions": [ - "Once per day.", - "As directed by physician." - ], - "route": "As directed by physician." - }, - { - "status": "Completed", - "description": "Ibuprofen 200 MG Oral Tablet", - "refills": 0, - "authoredOn": "2012-11-16T00:00:00Z", - "dosageInstructions": [ - "DAILY PRN" - ], - "route": "ORAL" - }, - { - "status": "Active", - "notes": [ - "Ibuprofen 200 MG Oral Tablet" - ], - "description": "Ibuprofen 200 MG Oral Tablet", - "refills": 0, - "authoredOn": "2012-11-16T08:24:55Z", - "dosageInstructions": [ - "Once per day.", - "As directed by physician." - ], - "route": "As directed by physician." - }, - { - "status": "Completed", - "description": "Naproxen sodium 220 MG Oral Tablet", - "refills": 0, - "authoredOn": "2014-11-27T00:00:00Z" - }, - { - "status": "Active", - "notes": [ - "Naproxen sodium 220 MG Oral Tablet" - ], - "description": "Naproxen sodium 220 MG Oral Tablet", - "refills": 0, - "authoredOn": "2014-11-27T08:24:55Z", - "dosageInstructions": [ - "Once per day.", - "As directed by physician." - ], - "route": "As directed by physician." - } - ], - "bp_readings": [ - { - "date": "2009-03-19", - "diastolic": { - "code": "8462-4", - "display": "Diastolic blood pressure", - "unit": "mm[Hg]", - "value": 83.0 - }, - "systolic": { - "code": "8480-6", - "display": "Systolic blood pressure", - "unit": "mm[Hg]", - "value": 131.0 - }, - "practitioner": "DR. JANE460 DOE922 MD", - "organization": "LYONS VA MEDICAL CENTER" - }, - { - "date": "2010-03-25", - "diastolic": { - "code": "8462-4", - "display": "Diastolic blood pressure", - "unit": "mm[Hg]", - "value": 82.0 - }, - "systolic": { - "code": "8480-6", - "display": "Systolic blood pressure", - "unit": "mm[Hg]", - "value": 138.0 - }, - "practitioner": "DR. THOMAS359 REYNOLDS206 PHD", - "organization": "NEW AMSTERDAM CBOC" - }, - { - "date": "2011-03-31", - "diastolic": { - "code": "8462-4", - "display": "Diastolic blood pressure", - "unit": "mm[Hg]", - "value": 71.0 - }, - "systolic": { - "code": "8480-6", - "display": "Systolic blood pressure", - "unit": "mm[Hg]", - "value": 101.0 - }, - "practitioner": "DR. JOHN248 SMITH811 MD", - "organization": "LYONS VA MEDICAL CENTER" - }, - { - "date": "2012-04-05", - "diastolic": { - "code": "8462-4", - "display": "Diastolic blood pressure", - "unit": "mm[Hg]", - "value": 71.0 - }, - "systolic": { - "code": "8480-6", - "display": "Systolic blood pressure", - "unit": "mm[Hg]", - "value": 130.0 - }, - "practitioner": "DR. THOMAS359 REYNOLDS206 PHD", - "organization": "WASHINGTON VA MEDICAL CENTER" - }, - { - "date": "2013-04-11", - "diastolic": { - "code": "8462-4", - "display": "Diastolic blood pressure", - "unit": "mm[Hg]", - "value": 84.0 - }, - "systolic": { - "code": "8480-6", - "display": "Systolic blood pressure", - "unit": "mm[Hg]", - "value": 119.0 - }, - "organization": "LYONS VA MEDICAL CENTER" - }, - { - "date": "2014-04-17", - "diastolic": { - "code": "8462-4", - "display": "Diastolic blood pressure", - "unit": "mm[Hg]", - "value": 73.0 - }, - "systolic": { - "code": "8480-6", - "display": "Systolic blood pressure", - "unit": "mm[Hg]", - "value": 136.0 - }, - "practitioner": "DR. THOMAS359 REYNOLDS206 PHD", - "organization": "WASHINGTON VA MEDICAL CENTER" - }, - { - "date": "2015-04-23", - "diastolic": { - "code": "8462-4", - "display": "Diastolic blood pressure", - "unit": "mm[Hg]", - "value": 87.0 - }, - "systolic": { - "code": "8480-6", - "display": "Systolic blood pressure", - "unit": "mm[Hg]", - "value": 102.0 - }, - "practitioner": "DR. JOHN248 SMITH811 MD" - }, - { - "date": "2016-04-28", - "diastolic": { - "code": "8462-4", - "display": "Diastolic blood pressure", - "unit": "mm[Hg]", - "value": 74.0 - }, - "systolic": { - "code": "8480-6", - "display": "Systolic blood pressure", - "unit": "mm[Hg]", - "value": 119.0 - }, - "practitioner": "DR. JANE460 DOE922 MD", - "organization": "LYONS VA MEDICAL CENTER" - }, - { - "date": "2017-05-04", - "diastolic": { - "code": "8462-4", - "display": "Diastolic blood pressure", - "unit": "mm[Hg]", - "value": 71.0 - }, - "systolic": { - "code": "8480-6", - "display": "Systolic blood pressure", - "unit": "mm[Hg]", - "value": 105.0 - }, - "organization": "WASHINGTON VA MEDICAL CENTER" - }, - { - "date": "2018-05-10", - "diastolic": { - "code": "8462-4", - "display": "Diastolic blood pressure", - "unit": "mm[Hg]", - "value": 82.0 - }, - "systolic": { - "code": "8480-6", - "display": "Systolic blood pressure", - "unit": "mm[Hg]", - "value": 110.0 - }, - "practitioner": "DR. THOMAS359 REYNOLDS206 PHD", - "organization": "LYONS VA MEDICAL CENTER" - } - ] -} diff --git a/svc-lighthouse-api/src/test/resources/lighthouseToken.json b/svc-lighthouse-api/src/test/resources/lighthouseToken.json deleted file mode 100644 index 92d2da74d1..0000000000 --- a/svc-lighthouse-api/src/test/resources/lighthouseToken.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "access_token": "ezJraWQiOiJhd0xoWm9IdXYxd0hJQ1ZBZC1hV1R6ak5yLVpzeDdZQ3QyRWhMS092djVvIiwiYWxnIjoiUlMyNTYifQ.eyJ2ZXIiOjEsImp0aSI6IkFULktqNm85QUtmc0Rta2w2Q0dfZ2hHR1JJajFNZHV6VF9xZEM0QVNJSjNlSTgiLCJpc3MiOiJodHRwczovL2RlcHR2YS1ldmFsLm9rdGEuY29tL29hdXRoMi9hdXM4bm0xcTBmN1ZRMGE0ODJwNyIsImF1ZCI6Imh0dHBzOi8vc2FuZGJveC1hcGkudmEuZ292L3NlcnZpY2VzL2ZoaXIiLCJpYXQiOjE2NjIxNTE3NjAsImV4cCI6MTY2MjE1MjA2MCwiY2lkIjoiMG9haDI4cmI1akxqNE5lU04ycDciLCJzY3AiOlsibGF1bmNoIiwicGF0aWVudC9PYnNlcnZhdGlvbi5yZWFkIl0sInN1YiI6IjBvYWgyOHJiNWpMajROZVNOMnA3In0.LQdP4Bd_padKDOVW21qb2mccYx5CSanzdzoejFPHOcSmxcPhxoJUrl77lINhGQrNRwXIQsgxs8zUjFA_Wds4AxPWu3B9ac_eFgeASWCzeaY6l5Vxv25xMADJqW3s764RoRG4QQjVyk3BhHmul5GKRy2PpbqTUNQzfmXa3HZFV5UlMBmCYW10cOHR28bWfpRJGS38rXVfZ29L3uzlKHhH7HQkezs2trXKNNvbBVcLcSplobbT5nIZ-2adto3lgy4HgZ9h-lii9JeJ7nJjD6Go9r_C-4HUef01AenaaXiSw1KD0O4CS7iPnh3IHRH18UtZxS4-YNpxtgt04twvAJ6Iyg", - "token_type": "Bearer", - "scope": "launch patient/Observation.read", - "expires_in": 300, - "state": null, - "patient": "9000682" -} diff --git a/svc-lighthouse-api/src/test/resources/medication-response-bundle.json b/svc-lighthouse-api/src/test/resources/medication-response-bundle.json deleted file mode 100644 index 7ec5ba1918..0000000000 --- a/svc-lighthouse-api/src/test/resources/medication-response-bundle.json +++ /dev/null @@ -1,497 +0,0 @@ -{ - "resourceType": "Bundle", - "type": "searchset", - "total": 14, - "link": [ - { - "relation": "first", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/MedicationRequest?patient=9000682&page=1&_count=30" - }, - { - "relation": "self", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/MedicationRequest?patient=9000682&page=1&_count=30" - }, - { - "relation": "last", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/MedicationRequest?patient=9000682&page=1&_count=30" - } - ], - "entry": [ - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/MedicationRequest/I2-734ANV4IZT3MSYKY46RPQI3EKU000000", - "resource": { - "resourceType": "MedicationRequest", - "id": "I2-734ANV4IZT3MSYKY46RPQI3EKU000000", - "meta": { - "lastUpdated": "1950-04-06T12:24:55Z" - }, - "status": "active", - "category": null, - "code": null, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "intent": "plan", - "reportedBoolean": "true", - "medication": null, - "medicationReference": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Medication/I2-K74IYDVY4ZPUQQJT6BVMYCXCDI000000", - "display": "Hydrochlorothiazide 6.25 MG" - }, - "_requester": { - "extension": [ - { - "url": "https://hl7.org/fhir/extension-data-absent-reason.html", - "valueCode": "unknown" - } - ] - }, - "authoredOn": "1950-04-06T12:24:55Z", - "requester": null, - "note": [ - { - "text": "Hydrochlorothiazide 6.25 MG" - } - ], - "dispenseRequest": null, - "dosageInstruction": [ - { - "text": "Once per day.", - "timing": { - "repeat": { - "boundsPeriod": { - "start": "1950-04-06T12:24:55Z", - "end": null - } - }, - "code": { - "text": "As directed by physician." - } - }, - "asNeededBoolean": false, - "asNeededCodeableConcept": null, - "route": { - "text": "As directed by physician." - }, - "doseAndRate": null - } - ] - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/MedicationRequest/I2-ZFQTESH2PO2CQKSIHQCE2TQ3OI000000", - "resource": { - "resourceType": "MedicationRequest", - "id": "I2-ZFQTESH2PO2CQKSIHQCE2TQ3OI000000", - "meta": { - "lastUpdated": "1952-04-12T12:24:55Z" - }, - "status": "active", - "category": null, - "code": null, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "intent": "plan", - "reportedBoolean": "true", - "medication": null, - "medicationReference": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Medication/I2-47Q674EIOIHBXPB5FO735NWA6Q000000", - "display": "120 ACTUAT Fluticasone propionate 0.044 MG/ACTUAT Metered Dose Inhaler" - }, - "_requester": { - "extension": [ - { - "url": "https://hl7.org/fhir/extension-data-absent-reason.html", - "valueCode": "unknown" - } - ] - }, - "authoredOn": "1952-04-12T12:24:55Z", - "requester": null, - "note": [ - { - "text": "120 ACTUAT Fluticasone propionate 0.044 MG/ACTUAT Metered Dose Inhaler" - } - ], - "dispenseRequest": null, - "dosageInstruction": [ - { - "text": "Once per day.", - "timing": { - "repeat": { - "boundsPeriod": { - "start": "1952-04-12T12:24:55Z", - "end": null - } - }, - "code": { - "text": "As directed by physician." - } - }, - "asNeededBoolean": false, - "asNeededCodeableConcept": null, - "route": { - "text": "As directed by physician." - }, - "doseAndRate": null - } - ] - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/MedicationRequest/I2-2EQFSXK2O54A6A3PZYRUCZVMIM000000", - "resource": { - "resourceType": "MedicationRequest", - "id": "I2-2EQFSXK2O54A6A3PZYRUCZVMIM000000", - "meta": { - "lastUpdated": "1952-04-12T12:24:55Z" - }, - "status": "active", - "category": null, - "code": null, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "intent": "plan", - "reportedBoolean": "true", - "medication": null, - "medicationReference": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Medication/I2-2GBPSRNBBA6K6I3TVNURJZR5CU000000", - "display": "200 ACTUAT Albuterol 0.09 MG/ACTUAT Metered Dose Inhaler" - }, - "_requester": { - "extension": [ - { - "url": "https://hl7.org/fhir/extension-data-absent-reason.html", - "valueCode": "unknown" - } - ] - }, - "authoredOn": "1952-04-12T12:24:55Z", - "requester": null, - "note": [ - { - "text": "200 ACTUAT Albuterol 0.09 MG/ACTUAT Metered Dose Inhaler" - } - ], - "dispenseRequest": null, - "dosageInstruction": [ - { - "text": "Once per day.", - "timing": { - "repeat": { - "boundsPeriod": { - "start": "1952-04-12T12:24:55Z", - "end": null - } - }, - "code": { - "text": "As directed by physician." - } - }, - "asNeededBoolean": false, - "asNeededCodeableConcept": null, - "route": { - "text": "As directed by physician." - }, - "doseAndRate": null - } - ] - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/MedicationRequest/I2-2SSFZVD74EVYP2DOIETD344NI4000000", - "resource": { - "resourceType": "MedicationRequest", - "id": "I2-2SSFZVD74EVYP2DOIETD344NI4000000", - "meta": { - "lastUpdated": "1953-04-26T12:24:55Z" - }, - "status": "active", - "category": null, - "code": null, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "intent": "plan", - "reportedBoolean": "true", - "medication": null, - "medicationReference": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Medication/I2-W7GJYKIN3RTUHC2RSCL4GACQEA000000", - "display": "diphenhydrAMINE Hydrochloride 25 MG Oral Tablet" - }, - "_requester": { - "extension": [ - { - "url": "https://hl7.org/fhir/extension-data-absent-reason.html", - "valueCode": "unknown" - } - ] - }, - "authoredOn": "1953-04-26T12:24:55Z", - "requester": null, - "note": [ - { - "text": "diphenhydrAMINE Hydrochloride 25 MG Oral Tablet" - } - ], - "dispenseRequest": null, - "dosageInstruction": [ - { - "text": "Once per day.", - "timing": { - "repeat": { - "boundsPeriod": { - "start": "1953-04-26T12:24:55Z", - "end": null - } - }, - "code": { - "text": "As directed by physician." - } - }, - "asNeededBoolean": false, - "asNeededCodeableConcept": null, - "route": { - "text": "As directed by physician." - }, - "doseAndRate": null - } - ] - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/MedicationRequest/I2-VIN54TIM4OAWMVELXHE452Y3QY000000", - "resource": { - "resourceType": "MedicationRequest", - "id": "I2-VIN54TIM4OAWMVELXHE452Y3QY000000", - "meta": { - "lastUpdated": "2009-08-04T12:24:55Z" - }, - "status": "active", - "category": null, - "code": null, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "intent": "plan", - "reportedBoolean": "true", - "medication": null, - "medicationReference": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Medication/I2-AWND5B63SZ63NVLFQPTTSQII3E000000", - "display": "Acetaminophen 160 MG" - }, - "_requester": { - "extension": [ - { - "url": "https://hl7.org/fhir/extension-data-absent-reason.html", - "valueCode": "unknown" - } - ] - }, - "authoredOn": "2009-08-04T12:24:55Z", - "requester": null, - "note": [ - { - "text": "Acetaminophen 160 MG" - } - ], - "dispenseRequest": null, - "dosageInstruction": [ - { - "text": "Once per day.", - "timing": { - "repeat": { - "boundsPeriod": { - "start": "2009-08-04T12:24:55Z", - "end": null - } - }, - "code": { - "text": "As directed by physician." - } - }, - "asNeededBoolean": false, - "asNeededCodeableConcept": null, - "route": { - "text": "As directed by physician." - }, - "doseAndRate": null - } - ] - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/MedicationRequest/I2-V6FA3TDKCKCTM7ERLMRFMTZXJI000000", - "resource": { - "resourceType": "MedicationRequest", - "id": "I2-V6FA3TDKCKCTM7ERLMRFMTZXJI000000", - "meta": { - "lastUpdated": "2012-11-16T13:24:55Z" - }, - "status": "active", - "category": null, - "code": null, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "intent": "plan", - "reportedBoolean": "true", - "medication": null, - "medicationReference": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Medication/I2-YUGFOTJPB3KB2IPP6OTJPGG7YA000000", - "display": "Ibuprofen 200 MG Oral Tablet" - }, - "_requester": { - "extension": [ - { - "url": "https://hl7.org/fhir/extension-data-absent-reason.html", - "valueCode": "unknown" - } - ] - }, - "authoredOn": "2012-11-16T13:24:55Z", - "requester": null, - "note": [ - { - "text": "Ibuprofen 200 MG Oral Tablet" - } - ], - "dispenseRequest": null, - "dosageInstruction": [ - { - "text": "Once per day.", - "timing": { - "repeat": { - "boundsPeriod": { - "start": "2012-11-16T13:24:55Z", - "end": null - } - }, - "code": { - "text": "As directed by physician." - } - }, - "asNeededBoolean": false, - "asNeededCodeableConcept": null, - "route": { - "text": "As directed by physician." - }, - "doseAndRate": null - } - ] - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/MedicationRequest/I2-NPQV7XYDVZMHF5SJGZBDSCSVMM000000", - "resource": { - "resourceType": "MedicationRequest", - "id": "I2-NPQV7XYDVZMHF5SJGZBDSCSVMM000000", - "meta": { - "lastUpdated": "2014-11-27T13:24:55Z" - }, - "status": "active", - "category": null, - "code": null, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "intent": "plan", - "reportedBoolean": "true", - "medication": null, - "medicationReference": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Medication/I2-VOF3C6DCH3U6NTLG36WMF2YLWE000000", - "display": "Naproxen sodium 220 MG Oral Tablet" - }, - "_requester": { - "extension": [ - { - "url": "https://hl7.org/fhir/extension-data-absent-reason.html", - "valueCode": "unknown" - } - ] - }, - "authoredOn": "2014-11-27T13:24:55Z", - "requester": null, - "note": [ - { - "text": "Naproxen sodium 220 MG Oral Tablet" - } - ], - "dispenseRequest": null, - "dosageInstruction": [ - { - "text": "Once per day.", - "timing": { - "repeat": { - "boundsPeriod": { - "start": "2014-11-27T13:24:55Z", - "end": null - } - }, - "code": { - "text": "As directed by physician." - } - }, - "asNeededBoolean": false, - "asNeededCodeableConcept": null, - "route": { - "text": "As directed by physician." - }, - "doseAndRate": null - } - ] - }, - "search": { - "mode": "match" - } - } - ] -} diff --git a/svc-lighthouse-api/src/test/resources/observation-response-bundle.json b/svc-lighthouse-api/src/test/resources/observation-response-bundle.json deleted file mode 100644 index c90b4cdc61..0000000000 --- a/svc-lighthouse-api/src/test/resources/observation-response-bundle.json +++ /dev/null @@ -1,441 +0,0 @@ -{ - "resourceType": "Bundle", - "type": "searchset", - "total": 4, - "link": [ - { - "relation": "first", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/Observation?code=85354-9&patient=23&_count=100&page=1" - }, - { - "relation": "self", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/Observation?code=85354-9&patient=23&_count=100&page=1" - }, - { - "relation": "last", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/Observation?code=85354-9&patient=23&_count=100&page=1" - } - ], - "entry": [ - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Observation/I2-VM5E2PSLE4DFE65BUPVL5UKZFU000000", - "resource": { - "resourceType": "Observation", - "id": "I2-VM5E2PSLE4DFE65BUPVL5UKZFU000000", - "meta": { - "lastUpdated": "2022-07-28T19:40:22Z" - }, - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/observation-category", - "code": "vital-signs", - "display": "Vital Signs" - } - ], - "text": "Vital Signs" - } - ], - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "85354-9", - "display": "Blood Pressure" - } - ], - "text": "Blood Pressure" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/23", - "display": "Dexter530 Leo278 Bechtelar572" - }, - "encounter": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Encounter/I2-I66GSQUVBWKWZ576CBAK3RGPSI000000" - }, - "effectiveDateTime": "2022-06-28T19:40:22Z", - "issued": "2022-06-28T19:40:22.826Z", - "performer": [ - { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-4URG7MC5PVUYVWB34JZB4K2WQU000000", - "display": "Dr. Fabiola106 Upton904 MD" - }, - { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Organization/I2-TVHFO7BMPDIONXX3YNIHSLEYQU000000", - "display": "TEST VAMC" - } - ], - "interpretation": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", - "code": "A", - "display": "Abnormal" - } - ], - "text": "A" - } - ], - "component": [ - { - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "8462-4", - "display": "Diastolic Blood Pressure" - } - ], - "text": "Diastolic Blood Pressure" - }, - "valueQuantity": { - "value": 83, - "unit": "mm Hg", - "system": "http://unitsofmeasure.org", - "code": "mm[Hg]" - } - }, - { - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "8480-6", - "display": "Systolic Blood Pressure" - } - ], - "text": "Systolic Blood Pressure" - }, - "valueQuantity": { - "value": 121, - "unit": "mm Hg", - "system": "http://unitsofmeasure.org", - "code": "mm[Hg]" - } - } - ] - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Observation/I2-Y4RGWIF6CN54U4YGJZCWUCTO7E000000", - "resource": { - "resourceType": "Observation", - "id": "I2-Y4RGWIF6CN54U4YGJZCWUCTO7E000000", - "meta": { - "lastUpdated": "2022-09-01T19:40:22Z" - }, - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/observation-category", - "code": "vital-signs", - "display": "Vital Signs" - } - ], - "text": "Vital Signs" - } - ], - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "85354-9", - "display": "Blood Pressure" - } - ], - "text": "Blood Pressure" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/23", - "display": "Dexter530 Leo278 Bechtelar572" - }, - "encounter": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Encounter/I2-E66JCJUY3DP76GBAMMIFSVW6OQ000000" - }, - "effectiveDateTime": "2022-08-02T19:40:22Z", - "issued": "2022-08-02T19:40:22.826Z", - "performer": [ - { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-4URG7MC5PVUYVWB34JZB4K2WQU000000", - "display": "Dr. Fabiola106 Upton904 MD" - }, - { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Organization/I2-TVHFO7BMPDIONXX3YNIHSLEYQU000000", - "display": "TEST VAMC" - } - ], - "interpretation": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", - "code": "A", - "display": "Abnormal" - } - ], - "text": "A" - } - ], - "component": [ - { - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "8462-4", - "display": "Diastolic Blood Pressure" - } - ], - "text": "Diastolic Blood Pressure" - }, - "valueQuantity": { - "value": 79, - "unit": "mm Hg", - "system": "http://unitsofmeasure.org", - "code": "mm[Hg]" - } - }, - { - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "8480-6", - "display": "Systolic Blood Pressure" - } - ], - "text": "Systolic Blood Pressure" - }, - "valueQuantity": { - "value": 110, - "unit": "mm Hg", - "system": "http://unitsofmeasure.org", - "code": "mm[Hg]" - } - } - ] - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Observation/I2-QDB7W2BXM4FEQTIVSVOCIUE5EU000000", - "resource": { - "resourceType": "Observation", - "id": "I2-QDB7W2BXM4FEQTIVSVOCIUE5EU000000", - "meta": { - "lastUpdated": "2022-11-03T19:40:22Z" - }, - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/observation-category", - "code": "vital-signs", - "display": "Vital Signs" - } - ], - "text": "Vital Signs" - } - ], - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "85354-9", - "display": "Blood Pressure" - } - ], - "text": "Blood Pressure" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/23", - "display": "Dexter530 Leo278 Bechtelar572" - }, - "encounter": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Encounter/I2-VIBA3BIVJOHQ3MXGNFIFZGLH3M000000" - }, - "effectiveDateTime": "2022-10-04T19:40:22Z", - "issued": "2022-10-04T19:40:22.826Z", - "performer": [ - { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-4URG7MC5PVUYVWB34JZB4K2WQU000000", - "display": "Dr. Fabiola106 Upton904 MD" - }, - { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Organization/I2-TVHFO7BMPDIONXX3YNIHSLEYQU000000", - "display": "TEST VAMC" - } - ], - "interpretation": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", - "code": "A", - "display": "Abnormal" - } - ], - "text": "A" - } - ], - "component": [ - { - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "8462-4", - "display": "Diastolic Blood Pressure" - } - ], - "text": "Diastolic Blood Pressure" - }, - "valueQuantity": { - "value": 75, - "unit": "mm Hg", - "system": "http://unitsofmeasure.org", - "code": "mm[Hg]" - } - }, - { - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "8480-6", - "display": "Systolic Blood Pressure" - } - ], - "text": "Systolic Blood Pressure" - }, - "valueQuantity": { - "value": 114, - "unit": "mm Hg", - "system": "http://unitsofmeasure.org", - "code": "mm[Hg]" - } - } - ] - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Observation/I2-YQOJTW3CEV6ST4PGJRXIO5VIKY000000", - "resource": { - "resourceType": "Observation", - "id": "I2-YQOJTW3CEV6ST4PGJRXIO5VIKY000000", - "meta": { - "lastUpdated": "2023-01-05T19:40:22Z" - }, - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/observation-category", - "code": "vital-signs", - "display": "Vital Signs" - } - ], - "text": "Vital Signs" - } - ], - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "85354-9", - "display": "Blood Pressure" - } - ], - "text": "Blood Pressure" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/23", - "display": "Dexter530 Leo278 Bechtelar572" - }, - "encounter": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Encounter/I2-AG4SZX2FSOJ3FPLBF6T3AL3JGE000000" - }, - "effectiveDateTime": "2022-12-06T19:40:22Z", - "issued": "2022-12-06T19:40:22.826Z", - "performer": [ - { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Practitioner/I2-4URG7MC5PVUYVWB34JZB4K2WQU000000", - "display": "Dr. Fabiola106 Upton904 MD" - }, - { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Organization/I2-TVHFO7BMPDIONXX3YNIHSLEYQU000000", - "display": "TEST VAMC" - } - ], - "interpretation": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", - "code": "A", - "display": "Abnormal" - } - ], - "text": "A" - } - ], - "component": [ - { - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "8462-4", - "display": "Diastolic Blood Pressure" - } - ], - "text": "Diastolic Blood Pressure" - }, - "valueQuantity": { - "value": 80, - "unit": "mm Hg", - "system": "http://unitsofmeasure.org", - "code": "mm[Hg]" - } - }, - { - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "8480-6", - "display": "Systolic Blood Pressure" - } - ], - "text": "Systolic Blood Pressure" - }, - "valueQuantity": { - "value": 113, - "unit": "mm Hg", - "system": "http://unitsofmeasure.org", - "code": "mm[Hg]" - } - } - ] - }, - "search": { - "mode": "match" - } - } - ] -} diff --git a/svc-lighthouse-api/src/test/resources/procedure-response-bundle.json b/svc-lighthouse-api/src/test/resources/procedure-response-bundle.json deleted file mode 100644 index 4c01aceb4a..0000000000 --- a/svc-lighthouse-api/src/test/resources/procedure-response-bundle.json +++ /dev/null @@ -1,715 +0,0 @@ -{ - "resourceType": "Bundle", - "type": "searchset", - "total": 19, - "link": [ - { - "relation": "first", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure?patient=9000682&_count=30&page=1" - }, - { - "relation": "self", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure?patient=9000682&_count=30&page=1" - }, - { - "relation": "last", - "url": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure?patient=9000682&_count=30&page=1" - } - ], - "entry": [ - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-WZJE3GUZGOW22OYPFWA6NYZDDY000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-WZJE3GUZGOW22OYPFWA6NYZDDY000000", - "meta": { - "lastUpdated": "2009-04-18T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Documentation of current medications" - } - ], - "text": "Documentation of current medications" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2009-03-19T12:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-2FPCKUIXVR7RJLLG34XVWGZERM000000", - "display": "MENTAL HEALTH SERVICES" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-PWTMZVHJRKZP6DADFO55P3MIJA000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-PWTMZVHJRKZP6DADFO55P3MIJA000000", - "meta": { - "lastUpdated": "2009-09-03T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Sputum examination (procedure)" - } - ], - "text": "Sputum examination (procedure)" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2009-08-04T12:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-2FPCKUIXVR7RJLLG34XVWGZERM000000", - "display": "MENTAL HEALTH SERVICES" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-I4ZBEFFOBLKYS6OCC7RDCNKI2U000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-I4ZBEFFOBLKYS6OCC7RDCNKI2U000000", - "meta": { - "lastUpdated": "2010-04-21T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Digital examination of rectum" - } - ], - "text": "Digital examination of rectum" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2010-03-22T12:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-3JYDMXC6RXTU4H25KRVXATSEJQ000000", - "display": "TEM MH PSO TRS IND93EH 2" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-6SJW3QD2MQKBNZZNIM6LZNKBOY000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-6SJW3QD2MQKBNZZNIM6LZNKBOY000000", - "meta": { - "lastUpdated": "2010-05-04T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Colonoscopy" - } - ], - "text": "Colonoscopy" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2010-04-04T12:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-3JYDMXC6RXTU4H25KRVXATSEJQ000000", - "display": "TEM MH PSO TRS IND93EH 2" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-LQWIMSSSJN4Z6LXIM7XYR2TWGY000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-LQWIMSSSJN4Z6LXIM7XYR2TWGY000000", - "meta": { - "lastUpdated": "2011-04-30T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Documentation of current medications" - } - ], - "text": "Documentation of current medications" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2011-03-31T12:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-2FPCKUIXVR7RJLLG34XVWGZERM000000", - "display": "MENTAL HEALTH SERVICES" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-SMNNM2MNOLK645ZSGIK6CQJZHE000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-SMNNM2MNOLK645ZSGIK6CQJZHE000000", - "meta": { - "lastUpdated": "2011-04-30T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Digital examination of rectum" - } - ], - "text": "Digital examination of rectum" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2011-03-31T12:24:55Z", - "location": null - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-75HAGUQ6OLMHOAQ3HMDLBVIUUQ000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-75HAGUQ6OLMHOAQ3HMDLBVIUUQ000000", - "meta": { - "lastUpdated": "2012-05-05T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Documentation of current medications" - } - ], - "text": "Documentation of current medications" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2012-04-05T12:24:55Z", - "location": null - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-CXVJYUN5UV6BEJ75GX2Y6JDX5Y000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-CXVJYUN5UV6BEJ75GX2Y6JDX5Y000000", - "meta": { - "lastUpdated": "2012-04-29T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Digital examination of rectum" - } - ], - "text": "Digital examination of rectum" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2012-03-30T12:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-2FPCKUIXVR7RJLLG34XVWGZERM000000", - "display": "MENTAL HEALTH SERVICES" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-TJGCXZCVFMARI7CG4MDLP4MW4E000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-TJGCXZCVFMARI7CG4MDLP4MW4E000000", - "meta": { - "lastUpdated": "2012-12-16T13:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Suture open wound" - } - ], - "text": "Suture open wound" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2012-11-16T13:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-4KG3N5YUSPTWD3DAFMLMRL5V5U000000", - "display": "VISUAL IMPAIRMENT SVCS OUTPATIENT REHAB (VISOR)" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-GB4TZ3IJ4ZSINL7KIH4UPHX6RE000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-GB4TZ3IJ4ZSINL7KIH4UPHX6RE000000", - "meta": { - "lastUpdated": "2013-05-11T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Digital examination of rectum" - } - ], - "text": "Digital examination of rectum" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2013-04-11T12:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-3JYDMXC6RXTU4H25KRVXATSEJQ000000", - "display": "TEM MH PSO TRS IND93EH 2" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-QBWKUZRSPRA4SYHPW7F3K6FBGI000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-QBWKUZRSPRA4SYHPW7F3K6FBGI000000", - "meta": { - "lastUpdated": "2014-05-17T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Documentation of current medications" - } - ], - "text": "Documentation of current medications" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2014-04-17T12:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-3JYDMXC6RXTU4H25KRVXATSEJQ000000", - "display": "TEM MH PSO TRS IND93EH 2" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-INDTA4P6AKKBE5N33E6Y62KT44000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-INDTA4P6AKKBE5N33E6Y62KT44000000", - "meta": { - "lastUpdated": "2014-05-11T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Digital examination of rectum" - } - ], - "text": "Digital examination of rectum" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2014-04-11T12:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-4KG3N5YUSPTWD3DAFMLMRL5V5U000000", - "display": "VISUAL IMPAIRMENT SVCS OUTPATIENT REHAB (VISOR)" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-U4QLTRRQFEEAWGDM66QIXWQLYY000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-U4QLTRRQFEEAWGDM66QIXWQLYY000000", - "meta": { - "lastUpdated": "2015-05-03T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Colonoscopy" - } - ], - "text": "Colonoscopy" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2015-04-03T12:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-2FPCKUIXVR7RJLLG34XVWGZERM000000", - "display": "MENTAL HEALTH SERVICES" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-UWRXTIZIVNRZIEWDHHHRYUPV44000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-UWRXTIZIVNRZIEWDHHHRYUPV44000000", - "meta": { - "lastUpdated": "2015-05-23T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Documentation of current medications" - } - ], - "text": "Documentation of current medications" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2015-04-23T12:24:55Z", - "location": null - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-JIMRFU23VKXHT7ZOLSXGC6STOM000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-JIMRFU23VKXHT7ZOLSXGC6STOM000000", - "meta": { - "lastUpdated": "2015-05-23T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Digital examination of rectum" - } - ], - "text": "Digital examination of rectum" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2015-04-23T12:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-3JYDMXC6RXTU4H25KRVXATSEJQ000000", - "display": "TEM MH PSO TRS IND93EH 2" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-ZTVZWKLWMWN7GGTDNVJPORZ6S4000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-ZTVZWKLWMWN7GGTDNVJPORZ6S4000000", - "meta": { - "lastUpdated": "2016-05-22T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Digital examination of rectum" - } - ], - "text": "Digital examination of rectum" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2016-04-22T12:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-2FPCKUIXVR7RJLLG34XVWGZERM000000", - "display": "MENTAL HEALTH SERVICES" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-44SOPCIUYCVAG7RDTFH7UZF4PU000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-44SOPCIUYCVAG7RDTFH7UZF4PU000000", - "meta": { - "lastUpdated": "2017-06-03T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Documentation of current medications" - } - ], - "text": "Documentation of current medications" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2017-05-04T12:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-4KG3N5YUSPTWD3DAFMLMRL5V5U000000", - "display": "VISUAL IMPAIRMENT SVCS OUTPATIENT REHAB (VISOR)" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-3I3DBVQ5UOZMT5PF7GW2B3PR4A000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-3I3DBVQ5UOZMT5PF7GW2B3PR4A000000", - "meta": { - "lastUpdated": "2017-06-03T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Digital examination of rectum" - } - ], - "text": "Digital examination of rectum" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2017-05-04T12:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-3JYDMXC6RXTU4H25KRVXATSEJQ000000", - "display": "TEM MH PSO TRS IND93EH 2" - } - }, - "search": { - "mode": "match" - } - }, - { - "fullUrl": "https://sandbox-api.va.gov/services/fhir/v0/r4/Procedure/I2-VPEBXSJ5ITR2OTBXQS5RTRCVFU000000", - "resource": { - "resourceType": "Procedure", - "id": "I2-VPEBXSJ5ITR2OTBXQS5RTRCVFU000000", - "meta": { - "lastUpdated": "2018-06-03T12:24:55Z" - }, - "status": "completed", - "category": null, - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "XXXXX", - "display": "Digital examination of rectum" - } - ], - "text": "Digital examination of rectum" - }, - "subject": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Patient/9000682", - "display": "Mr. Florentino8 Raynor401" - }, - "effectiveDateTime": null, - "issued": null, - "result": null, - "performedDateTime": "2018-05-04T12:24:55Z", - "location": { - "reference": "https://sandbox-api.va.gov/services/fhir/v0/r4/Location/I2-3JYDMXC6RXTU4H25KRVXATSEJQ000000", - "display": "TEM MH PSO TRS IND93EH 2" - } - }, - "search": { - "mode": "match" - } - } - ] -} From a4dbfd748b4cd2a7e407bc9b6103e0f5fd5d854a Mon Sep 17 00:00:00 2001 From: Mason Watson Date: Tue, 23 Apr 2024 15:16:25 -0700 Subject: [PATCH 2/2] rm svc-lighthouse-api --- helm/deploy.sh | 2 -- scripts/image_vars.src | 11 ++++------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/helm/deploy.sh b/helm/deploy.sh index 1e3a24ba32..e0f958b4d5 100755 --- a/helm/deploy.sh +++ b/helm/deploy.sh @@ -80,8 +80,6 @@ case "$HELM_CHART" in ;; svc-bgs-api) HELM_ARGS="$HELM_ARGS --set-string imageTag=$svcbgsapi_VER ";; - svc-lighthouse-api) - HELM_ARGS="$HELM_ARGS --set-string imageTag=$svclighthouseapi_VER ";; svc-bip-api) HELM_ARGS="$HELM_ARGS --set-string imageTag=$svcbipapi_VER";; postgres) diff --git a/scripts/image_vars.src b/scripts/image_vars.src index ba3e52bdca..c38fc14d36 100755 --- a/scripts/image_vars.src +++ b/scripts/image_vars.src @@ -5,14 +5,14 @@ # Array of VRO images # shellcheck disable=SC2034 -VRO_IMAGES_ARR=( postgres redis rabbitmq api-gateway app db-init dev-tools svc-bgs-api svc-lighthouse-api svc-bie-kafka svc-bip-api xample-workflows cc-app ee-max-cfi-app ee-ep-merge-app ) +VRO_IMAGES_ARR=( postgres redis rabbitmq api-gateway app db-init dev-tools svc-bgs-api svc-bie-kafka svc-bip-api xample-workflows cc-app ee-max-cfi-app ee-ep-merge-app ) # Usage: for IMG in ${VRO_IMAGES_ARR[@]}; do echo "- $IMG"; done -export VRO_IMAGES="postgres redis rabbitmq api-gateway app db-init dev-tools svc-bgs-api svc-lighthouse-api svc-bie-kafka svc-bip-api xample-workflows cc-app ee-max-cfi-app ee-ep-merge-app" +export VRO_IMAGES="postgres redis rabbitmq api-gateway app db-init dev-tools svc-bgs-api svc-bie-kafka svc-bip-api xample-workflows cc-app ee-max-cfi-app ee-ep-merge-app" # Array of variable prefixes # shellcheck disable=SC2034 -VAR_PREFIXES_ARR=( postgres redis rabbitmq apigateway app dbinit devtools svcbgsapi svclighthouseapi svcbiekafka svcbipapi xampleworkflows ccapp eemaxcfiapp eeepmergeapp ) -export VAR_PREFIXES="postgres redis rabbitmq apigateway app dbinit devtools svcbgsapi svclighthouseapi svcbiekafka svcbipapi xampleworkflows ccapp eemaxcfiapp eeepmergeapp" +VAR_PREFIXES_ARR=( postgres redis rabbitmq apigateway app dbinit devtools svcbgsapi svcbiekafka svcbipapi xampleworkflows ccapp eemaxcfiapp eeepmergeapp ) +export VAR_PREFIXES="postgres redis rabbitmq apigateway app dbinit devtools svcbgsapi svcbiekafka svcbipapi xampleworkflows ccapp eemaxcfiapp eeepmergeapp" ## Helper functions # Usage example to get the variable value for app_GRADLE_IMG: GRADLE_IMG_TAG=`getVarValue app _GRADLE_IMG` @@ -70,9 +70,6 @@ export devtools_IMG="vro-dev-tools" export svcbgsapi_GRADLE_IMG="va/abd_vro-svc-bgs-api" export svcbgsapi_IMG="vro-svc-bgs-api" -export svclighthouseapi_GRADLE_IMG="va/abd_vro-svc-lighthouse-api" -export svclighthouseapi_IMG="vro-svc-lighthouse-api" - export svcbiekafka_GRADLE_IMG="va/abd_vro-svc-bie-kafka" export svcbiekafka_IMG="vro-svc-bie-kafka"