helsenorge / structor

FHIR Questionnaire Form Builder
https://static.helsenorge.no/static_skjemabygger/
MIT License
88 stars 34 forks source link

add definition field #401

Closed LucChatty closed 3 years ago

LucChatty commented 3 years ago

Hello, I'm working on a fhir project which use questionnaires. Your interface respond to most of our needs but one : we use the definition field with the operations $populate and $apply. best,

Luc Chatty

mgunnerud commented 3 years ago

Hi @LucChatty, thank you for the pull request! According to the Questionnaire spec, I see that item.definition is type uri. We have a special input field called SystemField: https://github.com/helsenorge/structor/blob/master/src/components/FormField/SystemField.tsx

This field will validate that the input string is a valid uri (at the moment the string must starts with either "urn:", "http://" or "https://"). Could you change your implementation of definition input to use SystemField instead of InputField?

I plan to rename SystemField to UriField later this week since that is what it actually is.

LucChatty commented 3 years ago

Thanks for the feedback ! here is the updated version. image The only thing is the "System" label. How would you like to tackle the issue ? best

sonarcloud[bot] commented 3 years ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
76.4% 76.4% Duplication

mgunnerud commented 3 years ago

Looks good! I'll do some changes to change this field to a more generic uri field, so it will also support other labels than "System"

LucChatty commented 3 years ago

Awesome ! thank you very much for taking our needs into account so fast