Skip to content

Commit 14d35d5

Browse files
committed
Merge branch 'release/0.7.1'
2 parents e5ed5ce + fd4476b commit 14d35d5

File tree

4 files changed

+40
-9
lines changed

4 files changed

+40
-9
lines changed

.github/workflows/publish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: 12
15+
registry-url: https://registry.npmjs.org/
16+
- run: npm install
17+
- run: npm publish
18+
env:
19+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

notes/notes.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Licenser
1+
## Licenser
22

33
"licenser.license": "MIT",
44
"licenser.author": "Bell Eapen",
@@ -12,3 +12,14 @@
1212
const schemaValidationResult = R4.RTTI_Questionnaire.decode(fhirjson); // => Right if good, Left if not
1313
const fhirq: R4.IQuestionnaire = schemaValidationResult.value as R4.IQuestionnaire;
1414
```
15+
16+
17+
## Release
18+
19+
* npm run lint
20+
* gitflow -release
21+
* change version in package.json
22+
* npm run build
23+
* npm publish --dry-run
24+
* npm publish
25+
* finish gitflw release

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "fhirformjs",
33
"description": "FHIR Questionnaire To Form Converter for rendering",
4-
"version": "0.7.0",
4+
"version": "0.7.1",
55
"license": "MIT",
66
"main": "dist/index.js",
77
"typings": "dist/index.d.ts",

src/ques-mapper.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const FhirJsonForm = (
5151

5252
ALL_PROPERTIES[groupProperty]['properties'][
5353
myProperty
54-
] = GetItemProperties(item);
54+
] = GetItemProperties(groupItem);
5555

5656
if (GetWidget(groupItem) !== '') {
5757
UISchema[groupProperty][myProperty] = {
@@ -212,7 +212,8 @@ const GetValueType = (item: R4.IQuestionnaire_Item) => {
212212
case R4.Questionnaire_ItemTypeKind._boolean:
213213
return 'item.answer[0].valueBoolean';
214214
case R4.Questionnaire_ItemTypeKind._choice:
215-
return 'item.answer[0].valueCoding';
215+
case R4.Questionnaire_ItemTypeKind._openChoice:
216+
return 'item.answer[0].valueCoding'
216217

217218
default:
218219
return 'item.answer[0].valueString';
@@ -231,11 +232,11 @@ const CreateResponseItem = (item: R4.IQuestionnaire_Item) => {
231232

232233
switch (item.type) {
233234
case R4.Questionnaire_ItemTypeKind._choice:
234-
const option = (item.answerOption || [])[0];
235-
ans[key] = Object.keys(option.valueCoding || {}).reduce(
236-
(acc, prop) => ({ ...acc, [prop]: '' }),
237-
{}
238-
);
235+
case R4.Questionnaire_ItemTypeKind._openChoice:
236+
const option = (item.answerOption || [])[0]
237+
ans[key] = Object
238+
.keys(option.valueCoding || {})
239+
.reduce((acc, prop) => ({...acc, [prop]: ''}), {})
239240
break;
240241

241242
default:

0 commit comments

Comments
 (0)