Skip to content

Commit f901724

Browse files
committed
Merge branch 'refs/heads/main' into EFS-985-add-subset-of-Subscription-schema
2 parents 4735d3d + 8c8f9c9 commit f901724

10 files changed

+545
-31
lines changed

.github/workflows/publish_docker.yml

+36-28
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,41 @@
11
name: publish_docker
22

33
on:
4-
release:
5-
types: [created]
4+
release:
5+
types: [created]
66

77
jobs:
8-
main:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- name: Checkout Master
12-
uses: actions/checkout@v4
13-
- name: Set up QEMU
14-
uses: docker/setup-qemu-action@v2
15-
- name: Set up Docker Buildx
16-
uses: docker/setup-buildx-action@v2
17-
- name: Login to DockerHub
18-
uses: docker/login-action@v2
19-
with:
20-
username: ${{ secrets.DOCKERHUB_USERNAME }}
21-
password: ${{ secrets.DOCKERHUB_TOKEN }}
22-
- name: Get Previous tag
23-
id: previoustag
24-
uses: WyriHaximus/github-action-get-previous-tag@v1
25-
- name: Build and push
26-
id: docker_build
27-
uses: docker/build-push-action@v3
28-
with:
29-
push: true
30-
platforms: linux/amd64,linux/arm64
31-
tags: imranq2/node-fhir-server-mongo:latest, imranq2/node-fhir-server-mongo:${{ steps.previoustag.outputs.tag }}
32-
- name: Image digest
33-
run: echo ${{ steps.docker_build.outputs.digest }}
8+
main:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout Master
12+
uses: actions/checkout@v4
13+
- name: Set up QEMU
14+
uses: docker/setup-qemu-action@v2
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v2
17+
- name: Login to DockerHub
18+
uses: docker/login-action@v2
19+
with:
20+
username: ${{ secrets.DOCKERHUB_USERNAME }}
21+
password: ${{ secrets.DOCKERHUB_TOKEN }}
22+
- name: Get Previous tag
23+
id: previoustag
24+
uses: WyriHaximus/github-action-get-previous-tag@v1
25+
- name: Build and push
26+
id: docker_build
27+
uses: docker/build-push-action@v3
28+
with:
29+
push: true
30+
platforms: linux/amd64,linux/arm64
31+
tags: imranq2/node-fhir-server-mongo:latest, imranq2/node-fhir-server-mongo:${{ steps.previoustag.outputs.tag }}
32+
- name: Image digest
33+
run: echo ${{ steps.docker_build.outputs.digest }}
34+
- name: Build Status badge
35+
uses: peterrhodesdev/[email protected]
36+
with:
37+
token: ${{ secrets.GITHUB_TOKEN }}
38+
filename: build_status
39+
label: 'Build Status'
40+
message: ${{ steps.docker_build.outcome }}
41+
color: ${{ steps.docker_build.outcome == 'success' && '5ACD57' || 'FF0000' }}

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
![Node.js CI](https://github.com/imranq2/node-fhir-server-mongo/workflows/Node.js%20CI/badge.svg)
1+
![Testcase status](https://github.com/imranq2/node-fhir-server-mongo/workflows/Node.js%20CI/badge.svg)
22

3-
![publish_docker](https://github.com/imranq2/node-fhir-server-mongo/workflows/publish_docker/badge.svg)
3+
![Build Status](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/wiki/icanbwell/fhir-server/build_status.md)
44

55
## Intro
66

src/graphql/dataSource.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,13 @@ class FhirDataSource {
228228
const requestedResources = info
229229
.fieldNodes[0]
230230
.selectionSet
231-
?.selections?.map(s => s.typeCondition?.name?.value)
231+
?.selections?.map(s => {
232+
if (s.kind === 'FragmentSpread' && info.fragments) {
233+
return info.fragments[s.name.value]?.typeCondition?.name?.value
234+
} else {
235+
return s.typeCondition?.name?.value;
236+
}
237+
})
232238
?.filter(s => s) || [];
233239

234240
if (!reference.reference) {

src/tests/common.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const cron = require('node-cron');
12
const env = require('var');
23
const { jest } = require('@jest/globals');
34

@@ -87,6 +88,7 @@ module.exports.createTestRequest = async (fnUpdateContainer) => {
8788
module.exports.commonBeforeEach = async () => {
8889
// noinspection DynamicallyGeneratedCodeJS
8990
jest.setTimeout(30000);
91+
cron.schedule = jest.fn();
9092
env.VALIDATE_SCHEMA = true;
9193
const urlObject = new URL(env.AUTH_JWKS_URL);
9294
jwksEndpoint(urlObject.protocol + '//' + urlObject.host, urlObject.pathname, [
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"entry": [
3+
{
4+
"resource": {
5+
"id": "2",
6+
"provider": {
7+
"__typename": "Practitioner",
8+
"name": [
9+
{
10+
"family": "Azamar",
11+
"given": ["Daniel"]
12+
}
13+
]
14+
}
15+
}
16+
},
17+
{
18+
"resource": {
19+
"id": "3",
20+
"provider": null
21+
}
22+
},
23+
{
24+
"resource": {
25+
"id": "1",
26+
"provider": {
27+
"__typename": "Organization",
28+
"orgName": "Testing"
29+
}
30+
}
31+
}
32+
],
33+
"meta": null
34+
}

0 commit comments

Comments
 (0)