Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use R5 of Fhir #150

Open
DaniArj1980 opened this issue May 31, 2024 · 15 comments
Open

Use R5 of Fhir #150

DaniArj1980 opened this issue May 31, 2024 · 15 comments

Comments

@DaniArj1980
Copy link

Good morning, Would there be a way to modify the code so that the questionnaires make use of the configuration of the R5 version of Fhir? Greetings, thank you.

@plynchnlm
Copy link
Member

lforms does support R5, except for 'disabledDisplay' and answerConstraint=optionsOrType. What are you having trouble with?

@DaniArj1980
Copy link
Author

Thank you very much for the response, my idea is to use the functionality made in the formbuilder demo at the url: https://lhcforms.nlm.nih.gov/lhcforms. I don't know if I need to make any configuration to use a version R5 questionnaire. In this case I would like to expand because I don't know if a questionnaire items of the attachment type is made, to add a file to the questionnaire.

Greetings, thank you

@plynchnlm
Copy link
Member

https://lhcforms.nlm.nih.gov/lhcforms is actually the demo of LHC-Forms (not the formbuilder, which is at https://formbuilder.nlm.nih.gov), but yes, you should be able to load an R5 Questionnaire there using the "Load From File" button, and we do support Questionnaire items of type attachment.

@DaniArj1980
Copy link
Author

Thanks, I would have to make some type of modification to the demo to be able to use R5, on a local server?

@plynchnlm
Copy link
Member

There should be no need to modify lforms (this package) to use R5. Which demo are you referring to? Some of our demos are probably in need of an update.

@DaniArj1980
Copy link
Author

Yes, I refer to https://lhcforms.nlm.nih.gov/lhcforms

@plynchnlm
Copy link
Member

Okay, that demo is not open-source, because it is a part of the project website. What part of that demo is of interest to you? I assume you probably don't want the same sidebar. Would this demo, which is one of the demos on the lforms documentation site, be a good starting point for you?

@DaniArj1980
Copy link
Author

Yes, of course. I would be interested in both the formbuilder and the formviewer for questionnaire in R5

@plynchnlm
Copy link
Member

plynchnlm commented Jun 4, 2024

The formbuilder is a separate package, https://github.com/LHNCBC/formbuilder-lhcforms, which is also on-line as a website, https://formbuilder.nlm.nih.gov/. However, it does not have R5 support yet.

@DaniArj1980
Copy link
Author

And could you use this functionality for a Fhir R5 service? If so, what changes should I make? because it gives me problems for the choise types since in R5, they no longer exist, it would be the coding types

@plynchnlm
Copy link
Member

The formbuidler's UI is still focused on R4, and only does lists for types choice and open-choice. However, if that limitation is acceptable, you could use lforms to convert the formbuilder's R4 output to R5 (so the types of the lists would be "coding").

@DaniArj1980
Copy link
Author

Would this be very complex? Would I have to modify a code? I already have the lform library modified?

@plynchnlm
Copy link
Member

Well, I am not clear on what you are doing. If you are going to use the formbuilder, you would probably want to modify that code to provide an option to export the built form in R5 format, which you could create using this lforms package, by importing the R4 version and exporting it in R5, using the documented FHIR APIs.

@DaniArj1980
Copy link
Author

Hello, I have managed to solve the choise problem for R5, but when I try to make a post, I get the following error:

Error: Question with linkId '2561826271176' contains enableWhen pointing to a question with linkId 'undefined' that does not exist.

This occurs when calling the function
LForms.Util.convertFHIRQuestionnaireToLForms(fhirQ),'R5')

@plynchnlm
Copy link
Member

That error indicates that there is a problem with the Questionnaire definition. It is saying that the question that has linkId 2561826271176 has an enableWhen section that that is missing a linkId (in the "enableWhen.question" field).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants