care.emr.resources.questionnaire.spec module¶
- class EnableOperator(*values)¶
-
- exists = 'exists'¶
- equals = 'equals'¶
- not_equals = 'not_equals'¶
- greater = 'greater'¶
- less = 'less'¶
- greater_or_equals = 'greater_or_equals'¶
- less_or_equals = 'less_or_equals'¶
- class QuestionType(*values)¶
-
- group = 'group'¶
- boolean = 'boolean'¶
- decimal = 'decimal'¶
- integer = 'integer'¶
- string = 'string'¶
- text = 'text'¶
- display = 'display'¶
- date = 'date'¶
- datetime = 'dateTime'¶
- time = 'time'¶
- choice = 'choice'¶
- url = 'url'¶
- quantity = 'quantity'¶
- structured = 'structured'¶
- class QuestionnaireBaseSpec(*, meta: dict = {})¶
Bases:
EMRResource- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Performer(*, meta: dict = {}, performer_type: str, performer_id: str | None, text: str | None)¶
Bases:
QuestionnaireBaseSpec- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class EnableWhen(*, meta: dict = {}, question: str, operator: EnableOperator, answer: Any)¶
Bases:
QuestionnaireBaseSpec- operator: EnableOperator¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class AnswerOption(*, meta: dict = {}, value: Any, initial_selected: bool = False)¶
Bases:
QuestionnaireBaseSpec- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Question(*, meta: dict = {}, link_id: str, id: ~typing.Annotated[~uuid.UUID, ~pydantic.types.UuidVersion(uuid_version=4)] | ~typing.Annotated[~uuid.UUID, ~pydantic.types.UuidVersion(uuid_version=5)] = <factory>, code: ~care.emr.utils.valueset_coding_type.ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding | None = None, collect_time: bool = False, collect_performer: bool = False, text: str, description: str | None = None, type: ~care.emr.resources.questionnaire.spec.QuestionType, structured_type: str | None = None, enable_when: list[~care.emr.resources.questionnaire.spec.EnableWhen] | None = None, enable_behavior: ~care.emr.resources.questionnaire.spec.EnableBehavior | None = None, disabled_display: ~care.emr.resources.questionnaire.spec.DisabledDisplay | None = None, collect_body_site: bool | None = None, collect_method: bool | None = None, required: bool | None = None, repeats: bool | None = None, read_only: bool | None = None, max_length: int | None = None, answerConstraint: ~care.emr.resources.questionnaire.spec.AnswerConstraint | None = None, answer_option: list[~care.emr.resources.questionnaire.spec.AnswerOption] | None = None, answer_value_set: str | None = None, is_observation: bool | None = None, unit: ~care.emr.utils.valueset_coding_type.ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding | None = None, questions: list[~care.emr.resources.questionnaire.spec.Question] = [], formula: str | None = None, styling_metadata: dict = {}, is_component: bool = False)¶
Bases:
QuestionnaireBaseSpec- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- code: BoundCoding | None¶
- type: QuestionType¶
- enable_when: list[EnableWhen] | None¶
- enable_behavior: EnableBehavior | None¶
- disabled_display: DisabledDisplay | None¶
- answer_constraint: AnswerConstraint | None¶
- answer_option: list[AnswerOption] | None¶
- unit: BoundCoding | None¶
- classmethod validate_value_set(slug)¶
- get_all_ids()¶
- validate_choice_and_group_questions()¶
- class QuestionnaireWriteSpec(*, meta: dict = {}, version: str = '1.0', slug: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=5), MaxLen(max_length=36)]), AfterValidator(func=slug_validator)] | None = None, title: str, description: str | None = None, type: str = 'custom', status: QuestionnaireStatus, subject_type: SubjectType, styling_metadata: dict = {}, questions: list[Question])¶
Bases:
QuestionnaireBaseSpec- slug: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=5), MaxLen(max_length=36)]), AfterValidator(func=slug_validator)] | None¶
- status: QuestionnaireStatus¶
- subject_type: SubjectType¶
- get_all_ids()¶
- validate_unique_id()¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class QuestionnaireSpec(*, meta: dict = {}, version: str = '1.0', slug: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=5), MaxLen(max_length=36)]), AfterValidator(func=slug_validator)] | None = None, title: str, description: str | None = None, type: str = 'custom', status: QuestionnaireStatus, subject_type: SubjectType, styling_metadata: dict = {}, questions: list[Question], organizations: Annotated[list[Annotated[UUID, UuidVersion(uuid_version=4)]], MinLen(min_length=1)], tags: list[Annotated[UUID, UuidVersion(uuid_version=4)]] = [])¶
Bases:
QuestionnaireWriteSpec- classmethod validate_tags(tags)¶
- perform_extra_deserialization(is_update, obj)¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class QuestionnaireUpdateSpec(*, meta: dict = {}, version: str = '1.0', slug: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=5), MaxLen(max_length=36)]), AfterValidator(func=slug_validator)] | None = None, title: str, description: str | None = None, type: str = 'custom', status: QuestionnaireStatus, subject_type: SubjectType, styling_metadata: dict = {}, questions: list[Question])¶
Bases:
QuestionnaireWriteSpec- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class QuestionnaireReadSpec(*, meta: dict = {}, id: str, slug: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=5), MaxLen(max_length=36)]), AfterValidator(func=slug_validator)] | None = None, version: str, title: str, description: str | None = None, status: QuestionnaireStatus, subject_type: SubjectType, styling_metadata: dict, questions: list, created_by: UserSpec = {}, updated_by: UserSpec = {}, tags: list[dict] = [])¶
Bases:
QuestionnaireBaseSpec- slug: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=5), MaxLen(max_length=36)]), AfterValidator(func=slug_validator)] | None¶
- status: QuestionnaireStatus¶
- subject_type: SubjectType¶
- classmethod perform_extra_serialization(mapping, obj)¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class QuestionnaireTagSpec(*, meta: dict = {}, id: Annotated[UUID, UuidVersion(uuid_version=4)] | None = None, name: str, slug: Annotated[str, MinLen(min_length=5), MaxLen(max_length=36), AfterValidator(func=slug_validator)])¶
Bases:
EMRResource- slug: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=5), MaxLen(max_length=36)]), AfterValidator(func=slug_validator)]¶
- classmethod perform_extra_serialization(mapping, obj)¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].