Backend resource · STATIC DECLARATIONS
Questionnaire API reference · mansoq-core
Static source contract for Questionnaire: 13 declared or inherited operation mappings, schema/field evidence and authorization/refusal references. Deployment and behavioral review remain explicit.
Static API contract — behavior review pending. Source baseline f6e9f05f76d4.
Enable JavaScript to inspect structured operation, parameter, schema and permission evidence. Download this reference and its evidence.
Declared route and availability
This resource is declared in mansoq-core at /api/v1/questionnaire/. verified core mount in config/urls.py A registered path and an indexed handler do not prove deployment availability, user permission or production readiness.
Operation map
| Method | Path | Action | Evidence |
|---|---|---|---|
| GET | /api/v1/questionnaire/ |
list | declared/inherited method |
| POST | /api/v1/questionnaire/ |
create | declared/inherited method |
| GET | /api/v1/questionnaire/{slug}/ |
retrieve | declared/inherited method |
| PUT | /api/v1/questionnaire/{slug}/ |
update | declared/inherited method |
| PATCH | /api/v1/questionnaire/{slug}/ |
partial_update | declared/inherited method |
| DELETE | /api/v1/questionnaire/{slug}/ |
destroy | declared/inherited method |
| GET | /api/v1/questionnaire/favorite_lists/ |
favorite_lists | @action declaration |
| POST | /api/v1/questionnaire/{slug}/add_favorite/ |
add_favorite | @action declaration |
| POST | /api/v1/questionnaire/{slug}/remove_favorite/ |
remove_favorite | @action declaration |
| POST | /api/v1/questionnaire/upsert/ |
upsert | @action declaration |
| POST | /api/v1/questionnaire/{slug}/submit/ |
submit | @action declaration |
| GET | /api/v1/questionnaire/{slug}/get_organizations/ |
get_organizations | @action declaration |
| POST | /api/v1/questionnaire/{slug}/set_organizations/ |
set_organizations | @action declaration |
list · GET
GET /api/v1/questionnaire/ — action list. static contract extracted; runtime/permission/payload behavior review pending.
response: QuestionnaireReadSpec. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| meta | dict | false | No extra constraint extracted |
| id | str | true | No extra constraint extracted |
| slug | SlugType | None | false | No extra constraint extracted |
| version | str | true | No extra constraint extracted |
| title | str | true | No extra constraint extracted |
| description | str | None | false | No extra constraint extracted |
| status | QuestionnaireStatus | true | No extra constraint extracted |
| subject_type | SubjectType | true | No extra constraint extracted |
| styling_metadata | dict | true | No extra constraint extracted |
| questions | list | true | No extra constraint extracted |
| created_by | dict | None | false | No extra constraint extracted |
| updated_by | dict | None | false | No extra constraint extracted |
Observed authorization checks: get_filtered_questionnaires. Helper/queryset evidence is included; this is not proof of complete security review.
create · POST
POST /api/v1/questionnaire/ — action create. static contract extracted; runtime/permission/payload behavior review pending.
request: QuestionnaireSpec. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| meta | dict | false | No extra constraint extracted |
| version | str | false | description: Version of the questionnaire |
| slug | SlugType | None | false | No extra constraint extracted |
| title | str | true | No extra constraint extracted |
| description | str | None | false | No extra constraint extracted |
| type | str | false | No extra constraint extracted |
| status | QuestionnaireStatus | true | No extra constraint extracted |
| subject_type | SubjectType | true | No extra constraint extracted |
| styling_metadata | dict | false | description: Styling requirements without validation |
| questions | list[Question] | true | No extra constraint extracted |
| organizations | list[UUID4] | true | min_length: 1 |
response: QuestionnaireReadSpec. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
Observed authorization checks: get_filtered_questionnaires, can_write_questionnaire. Helper/queryset evidence is included; this is not proof of complete security review.
Declared refusal/error evidence: PermissionDenied: Permission Denied for Organization.
retrieve · GET
GET /api/v1/questionnaire/{slug}/ — action retrieve. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | slug | router lookup string; semantic ID validation requires handler/schema review | true |
response: QuestionnaireReadSpec. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
Observed authorization checks: get_filtered_questionnaires. Helper/queryset evidence is included; this is not proof of complete security review.
update · PUT
PUT /api/v1/questionnaire/{slug}/ — action update. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | slug | router lookup string; semantic ID validation requires handler/schema review | true |
request: QuestionnaireUpdateSpec. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| meta | dict | false | No extra constraint extracted |
| version | str | false | description: Version of the questionnaire |
| slug | SlugType | None | false | No extra constraint extracted |
| title | str | true | No extra constraint extracted |
| description | str | None | false | No extra constraint extracted |
| type | str | false | No extra constraint extracted |
| status | QuestionnaireStatus | true | No extra constraint extracted |
| subject_type | SubjectType | true | No extra constraint extracted |
| styling_metadata | dict | false | description: Styling requirements without validation |
| questions | list[Question] | true | No extra constraint extracted |
response: QuestionnaireReadSpec. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
Observed authorization checks: get_filtered_questionnaires. Helper/queryset evidence is included; this is not proof of complete security review.
Declared refusal/error evidence: PermissionDenied: Only Superusers can edit a questionnaire.
partial_update · PATCH
PATCH /api/v1/questionnaire/{slug}/ — action partial_update. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | slug | router lookup string; semantic ID validation requires handler/schema review | true |
request: QuestionnaireUpdateSpec. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
response: QuestionnaireReadSpec. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
Observed authorization checks: get_filtered_questionnaires. Helper/queryset evidence is included; this is not proof of complete security review.
Declared refusal/error evidence: PermissionDenied: Only Superusers can edit a questionnaire.
destroy · DELETE
DELETE /api/v1/questionnaire/{slug}/ — action destroy. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | slug | router lookup string; semantic ID validation requires handler/schema review | true |
Observed authorization checks: get_filtered_questionnaires. Helper/queryset evidence is included; this is not proof of complete security review.
Explicit response statuses in observed code: status.HTTP_204_NO_CONTENT. Other branches/framework exception handling may differ.
Declared refusal/error evidence: PermissionDenied: Only Superusers can delete a questionnaire.
favorite_lists · GET
GET /api/v1/questionnaire/favorite_lists/ — action favorite_lists. static contract extracted; runtime/permission/payload behavior review pending.
Directly observed request reads (these do not constitute a complete accepted-payload or requiredness guarantee):
| Location | Field | Declared/inferred read type | Requiredness evidence |
|---|---|---|---|
| query | facility |
not declared at read site | not established |
Observed authorization checks: get_filtered_questionnaires. Helper/queryset evidence is included; this is not proof of complete security review.
add_favorite · POST
POST /api/v1/questionnaire/{slug}/add_favorite/ — action add_favorite. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | slug | router lookup string; semantic ID validation requires handler/schema review | true |
Observed authorization checks: get_filtered_questionnaires. Helper/queryset evidence is included; this is not proof of complete security review.
remove_favorite · POST
POST /api/v1/questionnaire/{slug}/remove_favorite/ — action remove_favorite. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | slug | router lookup string; semantic ID validation requires handler/schema review | true |
Observed authorization checks: get_filtered_questionnaires. Helper/queryset evidence is included; this is not proof of complete security review.
Declared refusal/error evidence: ValidationError: Favorite List not found.
upsert · POST
POST /api/v1/questionnaire/upsert/ — action upsert. static contract extracted; runtime/permission/payload behavior review pending.
Directly observed request reads (these do not constitute a complete accepted-payload or requiredness guarantee):
| Location | Field | Declared/inferred read type | Requiredness evidence |
|---|---|---|---|
| body | datapoints |
not declared at read site | not established |
Observed authorization checks: get_filtered_questionnaires, can_write_questionnaire. Helper/queryset evidence is included; this is not proof of complete security review.
Explicit response statuses in observed code: 400. Other branches/framework exception handling may differ.
Declared refusal/error evidence: RestFrameworkValidationError: Invalid request data; RestFrameworkValidationError: No datapoints provided; RestFrameworkValidationError: Too many datapoints provided; PermissionDenied: Only Superusers can edit a questionnaire; PermissionDenied: Permission Denied for Organization.
Conditional gates: conditional/computed expression; inspect pinned declaration comparison settings.MAX_DATAPOINTS_PER_UPSERT.
submit · POST
POST /api/v1/questionnaire/{slug}/submit/ — action submit. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | slug | router lookup string; semantic ID validation requires handler/schema review | true |
decorator request: QuestionnaireSubmitRequest. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| resource_id | UUID4 | true | No extra constraint extracted |
| encounter | UUID4 | None | false | No extra constraint extracted |
| patient | UUID4 | true | No extra constraint extracted |
| results | list[QuestionnaireSubmitResult] | true | No extra constraint extracted |
| form_submission | UUID4 | None | false | No extra constraint extracted |
decorator responses: QuestionnaireResponseReadSpec. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| meta | dict | false | No extra constraint extracted |
| id | UUID4 | true | No extra constraint extracted |
| status | str | true | No extra constraint extracted |
| questionnaire | QuestionnaireReadSpec | true | No extra constraint extracted |
| subject_id | str | true | No extra constraint extracted |
| responses | list | true | No extra constraint extracted |
| encounter | str | None | false | No extra constraint extracted |
| structured_responses | dict | true | No extra constraint extracted |
| structured_response_type | str | true | No extra constraint extracted |
| created_by | UserSpec | false | No extra constraint extracted |
| updated_by | UserSpec | false | No extra constraint extracted |
| created_date | datetime | None | false | No extra constraint extracted |
| modified_date | datetime | None | false | No extra constraint extracted |
Observed authorization checks: can_submit_encounter_questionnaire_obj, can_submit_questionnaire_patient_obj, get_filtered_questionnaires. Helper/queryset evidence is included; this is not proof of complete security review.
Declared refusal/error evidence: PermissionDenied: Permission Denied to submit patient questionnaire; ValidationError: Form submission already has a response.
get_organizations · GET
Get all External Organizations connected to this Questionnaire
GET /api/v1/questionnaire/{slug}/get_organizations/ — action get_organizations. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | slug | router lookup string; semantic ID validation requires handler/schema review | true |
Observed authorization checks: get_filtered_questionnaires. Helper/queryset evidence is included; this is not proof of complete security review.
set_organizations · POST
Bulk Update all External Organizations connected to this Questionnaire
POST /api/v1/questionnaire/{slug}/set_organizations/ — action set_organizations. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | slug | router lookup string; semantic ID validation requires handler/schema review | true |
Observed authorization checks: can_write_questionnaire_obj, can_write_questionnaire, get_filtered_questionnaires. Helper/queryset evidence is included; this is not proof of complete security review.
Declared refusal/error evidence: PermissionDenied: Permission Denied for Questionnaire; PermissionDenied: Permission Denied for Organization.
Integration review checklist
Confirm the installed route and full schema; review authentication, organization/facility scoping, all accepted fields, value-state and date/time semantics, idempotency, pagination, response/exception branches and the allowed correction/reversal workflow. Test positive and negative cases with synthetic data. This source reference does not establish external certification or replace an illustrated user procedure.
Pinned source evidence
Links require access to the private source repository.
- repositories/platform/mansoq-core/config/api_router.py:222
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/questionnaire.py:43
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:168
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/questionnaire.py:104
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:161
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:330
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:158
- repositories/platform/mansoq-core/mansoq/emr/resources/questionnaire/spec.py:258
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:136
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/questionnaire.py:95
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:142
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:130
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:346
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/questionnaire.py:72
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:139
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:325
- repositories/platform/mansoq-core/mansoq/emr/resources/questionnaire/spec.py:247
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:83
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:80
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:77
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:214
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/questionnaire.py:64
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:228
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:201
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:335
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:180
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:222
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:352
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:349
- repositories/platform/mansoq-core/mansoq/emr/resources/questionnaire/spec.py:254
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:218
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:261
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/questionnaire.py:68
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:258
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:253
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/favorites.py:29
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/favorites.py:62
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/questionnaire.py:53
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/favorites.py:85
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:271
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/questionnaire.py:116
- repositories/platform/mansoq-core/mansoq/emr/resources/questionnaire_response/spec.py:36
- repositories/platform/mansoq-core/mansoq/emr/resources/questionnaire_response/spec.py:54
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/questionnaire.py:158
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/questionnaire.py:182