---
title: "Facade Questionnaire"
canonical: "https://wiki.patientsknowbest.com/space/api/3364946445/Facade%20Questionnaire"
format: markdown
---
[http://fhir.patientsknowbest.com/structuredefinition/facade-questionnaire](http://fhir.patientsknowbest.com/structuredefinition/facade-questionnaire)

[https://www.hl7.org/fhir/STU3/questionnaire.html](https://www.hl7.org/fhir/STU3/questionnaire.html)

## Overview

Each [[Consultation]] in PKB will map to a single FHIR Questionnaire.

## Relevant PKB entities

- [[[Consultation]]](https://wiki.patientsknowbest.com/space/api/3744759809/Entity%3A+Consultation)

## Mappings

| **FHIR** | **PKB** | **Notes** |
| --- | --- | --- |
| Resource id | [[Consultation.Public ID]] |  |
| Resource meta | - meta: Meta
  - lastUpdated = [[Consultation.Creation Timestamp]]
  - security: Coding
    - system =  "[http://fhir.patientsknowbest.com/codesystem/privacy-label](http://fhir.patientsknowbest.com/codesystem/privacy-label)"
    - code = [[Consultation.Privacy Label]]<br>[[Consultation.Privacy Label]] code mappings (PKB → FHIR):<br>- GENERAL_HEALTH → GENERAL_HEALTH
- MENTAL_HEALTH → MENTAL_HEALTH
- SEXUAL_HEALTH → SEXUAL_HEALTH
- SOCIAL_CARE → SOCIAL_CARE |  |
| Questionnaire.title | [[Consultation.Name]] |  |
| Questionnaire.status | "active" | Note that a Questionnaire has a status of “active” even if it has been hidden in PKB. |
| Questionnaire.date | [[Consultation.Creation Timestamp]] |  |
| Questionnaire.publisher | - publisher = [[Consultation->Team.Name]]
  - extension[0]
    - url = “[http://fhir.patientsknowbest.com/structuredefinition/publisher-reference](http://fhir.patientsknowbest.com/structuredefinition/publisher-reference)“
    - reference = the relative URL of the Organization representing [[Consultation->Team]] |  |
| Questionnaire.item | For each [[Consultation->Consultation Item]]<br>- item[x]: BackboneElement
  - linkId = [[Consultation Item.ID]]
  - text = [[Consultation Item.Text]]
  - type = [[Consultation Item.Type]]
  - <conditional>
  - If [[Consultation Item.Type]] is TITLE:
    - omit the repeats element
  - Else If [[Consultation Item.Type]] is CHECKBOX:
    - repeats = true
  - Else:
    - repeats = false
  - <conditional>
  - If [[Consultation Item.Type]] is RADIO or CHECKBOX, add an option element for each [[Consultation Item Option]]:
  - option: BackboneElement
    - valueString = [[Consultation Item Option.Text]]
  - Else: omit the option element<br>[[Consultation Item.Type]] code mappings (PKB → FHIR):<br>- TITLE → display
- TEXT → text
- RADIO → choice
- CHECKBOX → choice |  |