#431 - fix doco about questionnaire

This commit is contained in:
Grahame Grieve 2021-02-08 09:35:52 +11:00
parent 8fac290ebe
commit 2413ec1dbb
2 changed files with 26 additions and 2 deletions

View File

@ -1,7 +1,26 @@
package org.hl7.fhir.validation.cli.utils; package org.hl7.fhir.validation.cli.utils;
import org.hl7.fhir.utilities.Utilities;
public enum QuestionnaireMode { public enum QuestionnaireMode {
NONE, NONE,
CHECK, CHECK,
REQUIRED REQUIRED;
public static QuestionnaireMode fromCode(String v) {
if (Utilities.noString(v)) {
return NONE;
}
v = v.toLowerCase();
if (Utilities.existsInList(v, "none", "ignore")) {
return NONE;
}
if (Utilities.existsInList(v, "check")) {
return CHECK;
}
if (Utilities.existsInList(v, "require", "required")) {
return REQUIRED;
}
return NONE;
}
} }

View File

@ -41,7 +41,12 @@ The following parameters are supported:
Note: the profile (and it's dependencies) have to be made available Note: the profile (and it's dependencies) have to be made available
through one of the -ig parameters. Note that package dependencies will through one of the -ig parameters. Note that package dependencies will
automatically be resolved automatically be resolved
-questionnaire [file|url}: the location of a questionnaire. If provided, then the validator will validate -questionnaire mode: what to do with when validating QuestionnaireResponse resources
none (default): just ignore the questionnaire reference
required: check that the QuestionnaireResponse has a questionnaire and validate against it
check: if the QuestionnaireResponse has a questionnaire, validate against it
The questionnaire must be loaded using the -ig parameter
the location of a questionnaire. If provided, then the validator will validate
any QuestionnaireResponse that claims to match the Questionnaire against it any QuestionnaireResponse that claims to match the Questionnaire against it
no default value. This parameter can appear any number of times no default value. This parameter can appear any number of times
-output [file]: a filename for the results (OperationOutcome) -output [file]: a filename for the results (OperationOutcome)