{
  "openapi": "3.1.1",
  "info": {
    "title": "Sabio Saúde API",
    "description": "Transporte, agenda, pacientes, recepção, avisos e o app da população do Sabio Saúde (app.sabiosaude.digital). Autenticação por sessão: cookie (painel web) ou `Authorization: Bearer sbs_…` (obtido em POST /api/v1/sessoes com modo \"token\").",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.sabiosaude.digital/"
    }
  ],
  "paths": {
    "/api/v1/saude": {
      "get": {
        "tags": [
          "Operação"
        ],
        "summary": "A API está de pé, e em que versão do esquema.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Saude"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sessoes": {
      "post": {
        "tags": [
          "Sessões"
        ],
        "summary": "Entrar. Modo \"navegador\" grava cookie; modo \"token\" devolve o token no corpo. Com a verificação em duas etapas ligada, a sessão volta aguardando o código (POST /sessoes/atual/segundo-fator).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeEntrada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/sessoes/codigo": {
      "post": {
        "tags": [
          "Sessões"
        ],
        "summary": "Entrar com o celular: pede um código de 6 dígitos pelo WhatsApp (10 minutos, uma vez, 5 tentativas). Só a conta ativa única do painel com este celular, e não a de quem administra clientes. A resposta é sempre a mesma.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeCodigoDeEntrada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/sessoes/codigo/whatsapp": {
      "get": {
        "tags": [
          "Sessões"
        ],
        "summary": "O número oficial e a mensagem pronta para pedir o código PELO WhatsApp (a pessoa manda primeiro). 404 quando o número oficial não está ligado.",
        "parameters": [
          {
            "name": "painel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/sessoes/por-codigo": {
      "post": {
        "tags": [
          "Sessões"
        ],
        "summary": "Entrar com o código que chegou pelo WhatsApp ({celular, codigo, painel, modo, lembrar}). \"lembrar\": no navegador, 30 dias em vez de 8 horas. Código errado, vencido ou usado: 422 codigo_invalido, a mesma frase.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EntradaPorCodigo"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/sessoes/atual/segundo-fator": {
      "post": {
        "tags": [
          "Sessões"
        ],
        "summary": "O código do autenticador (ou um de recuperação), depois da senha. Cinco erros encerram a sessão.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeSegundoFator"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/sessoes/atual": {
      "get": {
        "tags": [
          "Sessões"
        ],
        "summary": "Quem está na sessão. Responde 200 com usuario nulo quando não há sessão.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessaoAtual"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Sessões"
        ],
        "summary": "Sair: encerra a sessão no servidor (vale para cookie e token).",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/sessoes/atual/orgaos": {
      "get": {
        "tags": [
          "Sessões"
        ],
        "summary": "Os órgãos em que esta pessoa pode trabalhar.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrgaoResumo"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sessoes/atual/orgao": {
      "put": {
        "tags": [
          "Sessões"
        ],
        "summary": "Troca o órgão ativo da sessão (só quem não pertence a um órgão).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeTrocaDeOrgao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessaoAtual"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgaos": {
      "get": {
        "tags": [
          "Órgãos"
        ],
        "summary": "Órgãos visíveis a quem pergunta (o administrador global vê todos; o do tenant, os do tenant dele).",
        "parameters": [
          {
            "name": "ativos",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenant",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfOrgaoResumo"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Órgãos"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FormularioDeOrgao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/orgaos/{codigo}": {
      "get": {
        "tags": [
          "Órgãos"
        ],
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgaoDetalhe"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Órgãos"
        ],
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FormularioDeOrgao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgaoDetalhe"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgaos/{codigo}/situacao": {
      "put": {
        "tags": [
          "Órgãos"
        ],
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeSituacao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgaoDetalhe"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgaos/{codigo}/modulos": {
      "get": {
        "tags": [
          "Órgãos"
        ],
        "summary": "O catálogo, marcando o que este órgão contratou.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ModuloDoOrgao"
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Órgãos"
        ],
        "summary": "Define a lista inteira do que fica contratado (o administrador global; o do tenant só muda os do Sábio TI). Desligar não apaga dado.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeModulos"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ModuloDoOrgao"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgaos/{codigo}/modulos/{modulo}": {
      "put": {
        "tags": [
          "Órgãos"
        ],
        "summary": "Liga UM módulo, sem mexer nos outros (o administrador global; o do tenant, só os do Sábio TI).",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "modulo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ModuloDoOrgao"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Órgãos"
        ],
        "summary": "Desliga UM módulo, sem mexer nos outros. Desligar não apaga dado.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "modulo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ModuloDoOrgao"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgaos/{codigo}/brasao": {
      "get": {
        "tags": [
          "Órgãos"
        ],
        "summary": "O brasão do órgão (PNG, JPEG ou WebP). 404 quando não há.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Órgãos"
        ],
        "summary": "Envia (ou troca) o brasão: multipart, campo \"arquivo\". PNG, JPEG ou WebP, até 2 MB.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "arquivo": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgaoDetalhe"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Órgãos"
        ],
        "summary": "Remove o brasão.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgaoDetalhe"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgaos/{codigo}/brasao/publico": {
      "post": {
        "tags": [
          "Órgãos"
        ],
        "summary": "Troca o brasão da prefeitura pelo brasão público do município (Wikidata/Commons). Só órgão do tipo Município; 404 quando a fonte não tem.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgaoDetalhe"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgaos/{codigo}/logos/{qual}": {
      "get": {
        "tags": [
          "Órgãos"
        ],
        "summary": "A logomarca do órgão: prefeitura ou saude (a secretaria de saúde). 404 quando não há.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "qual",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Órgãos"
        ],
        "summary": "Envia (ou troca) a logomarca: multipart, campo \"arquivo\". PNG (de preferência com fundo transparente), JPEG ou WebP, até 2 MB.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "qual",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "arquivo": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgaoDetalhe"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Órgãos"
        ],
        "summary": "Remove a logomarca.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "qual",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgaoDetalhe"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/usuarios": {
      "get": {
        "tags": [
          "Usuários"
        ],
        "summary": "As contas do órgão ativo da sessão (e, para o administrador global, os outros administradores).",
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "papel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ativos",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfUsuarioResumo"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Usuários"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FormularioDeUsuario"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/usuarios/papeis": {
      "get": {
        "tags": [
          "Usuários"
        ],
        "summary": "Os papéis que quem pergunta pode atribuir.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PapelAtribuivel"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/usuarios/paineis": {
      "get": {
        "tags": [
          "Usuários"
        ],
        "summary": "Os sistemas (painéis) que quem pergunta pode liberar para uma conta.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PainelAtribuivel"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/usuarios/{codigo}": {
      "get": {
        "tags": [
          "Usuários"
        ],
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsuarioResumo"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Usuários"
        ],
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FormularioDeUsuario"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsuarioResumo"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/usuarios/{codigo}/situacao": {
      "put": {
        "tags": [
          "Usuários"
        ],
        "summary": "Ativa ou desativa. Desativar encerra as sessões da conta; conta não se exclui.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeSituacao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsuarioResumo"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/usuarios/{codigo}/senha": {
      "put": {
        "tags": [
          "Usuários"
        ],
        "summary": "Redefine a senha de outra conta e encerra todas as sessões dela. Quem imprime (com pessoa ligada): só números, 6 a 8 (422 senha_nao_e_codigo / codigo_em_uso), e o PIN passa a ser ela.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeSenha"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/perfil": {
      "get": {
        "tags": [
          "Perfil"
        ],
        "summary": "A própria conta: nome, e-mail e celular (só dígitos, DDD + número; nulo quando não cadastrado).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerfilDaConta"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Perfil"
        ],
        "summary": "Grava o próprio celular (com ou sem máscara; vazio apaga). É por ele que sai o código do WhatsApp.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FormularioDoPerfil"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerfilDaConta"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/perfil/foto": {
      "get": {
        "tags": [
          "Perfil"
        ],
        "summary": "A foto da própria conta (PNG, JPEG ou WebP). 404 sem_foto quando não há.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Perfil"
        ],
        "summary": "Envia (ou troca) a foto da própria conta: multipart, campo \"arquivo\". PNG, JPEG ou WebP, até 2 MB. O formato sai dos bytes; SVG é recusado.",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "arquivo": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerfilDaConta"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Perfil"
        ],
        "summary": "Tira a foto da própria conta.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerfilDaConta"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/perfil/capa": {
      "get": {
        "tags": [
          "Perfil"
        ],
        "summary": "A foto de capa da própria conta (PNG, JPEG ou WebP). 404 sem_capa quando não há.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Perfil"
        ],
        "summary": "Envia (ou troca) a foto de capa da própria conta: multipart, campo \"arquivo\". PNG, JPEG ou WebP, até 4 MB. O formato sai dos bytes; SVG é recusado. A capa nova volta ao centro.",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "arquivo": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerfilDaConta"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Perfil"
        ],
        "summary": "Tira a foto de capa da própria conta.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerfilDaConta"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/perfil/capa/posicao": {
      "put": {
        "tags": [
          "Perfil"
        ],
        "summary": "Reposiciona a capa: a posição vertical do enquadramento, de 0 (topo) a 100 (base). 422 fora da faixa; 404 sem_capa.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDePosicaoDaCapa"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerfilDaConta"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/perfil/senha": {
      "put": {
        "tags": [
          "Perfil"
        ],
        "summary": "Troca a própria senha (exige a atual). Encerra as outras sessões e desmarca a senha provisória. Quem imprime (com pessoa ligada): só números, 6 a 8 (422 senha_nao_e_codigo / codigo_em_uso), e o PIN passa a ser ela.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeTrocaDeSenha"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/ufs": {
      "get": {
        "tags": [
          "Base pública"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UfResposta"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/coletas": {
      "get": {
        "tags": [
          "Base pública"
        ],
        "summary": "As coletas, das mais novas; ?situacao=Falhou mostra só as que falharam; &emAberto=true, só as que ninguém resolveu depois.",
        "parameters": [
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emAberto",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfColetaResposta"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/comunicacao/whatsapp": {
      "get": {
        "tags": [
          "Comunicação"
        ],
        "summary": "O WhatsApp da Sábio está ligado? (equipe da Sábio)",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SituacaoDoWhatsApp"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/modulos": {
      "get": {
        "tags": [
          "Módulos"
        ],
        "summary": "O catálogo: os módulos que um órgão pode contratar.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ModuloDoCatalogo"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/perfil/segundo-fator": {
      "get": {
        "tags": [
          "Perfil"
        ],
        "summary": "Se a verificação em duas etapas está ligada, desde quando, e quantos códigos de recuperação restam.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SegundoFatorDaConta"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Perfil"
        ],
        "summary": "Gera o segredo do autenticador (para o QR). Só liga depois de um código certo.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SegredoDoAutenticador"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/perfil/segundo-fator/ativacao": {
      "post": {
        "tags": [
          "Perfil"
        ],
        "summary": "Liga com o código do autenticador e devolve os códigos de recuperação (a única vez que aparecem). Encerra as outras sessões.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeCodigo"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodigosDeRecuperacaoGerados"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/perfil/segundo-fator/desativacao": {
      "post": {
        "tags": [
          "Perfil"
        ],
        "summary": "Desliga — exige o código atual do autenticador: quem pegou a sessão aberta não desliga a proteção.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeCodigo"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/perfil/segundo-fator/codigos": {
      "post": {
        "tags": [
          "Perfil"
        ],
        "summary": "Códigos de recuperação novos (exige o código do autenticador); os anteriores não usados deixam de valer.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeCodigo"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodigosDeRecuperacaoGerados"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/senha/recuperacao": {
      "post": {
        "tags": [
          "Senha"
        ],
        "summary": "Esqueci minha senha: com e-mail, um link (30 minutos, uso único) para o endereço do painel; com celular, um código de 6 dígitos pelo WhatsApp (10 minutos, 5 tentativas); com canal \"sms\", o código vai direto por SMS (1 por minuto e 3 a cada 24 horas por celular). A resposta é sempre a mesma.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeRecuperacaoDeSenha"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/senha/redefinicao": {
      "post": {
        "tags": [
          "Senha"
        ],
        "summary": "O link do e-mail ({token, senhaNova}) ou o código do WhatsApp ({celular, codigo, senhaNova, painel}): grava a senha nova e encerra todas as sessões da conta. O segundo fator continua.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeRedefinicaoDeSenha"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/paineis": {
      "get": {
        "tags": [
          "Painéis"
        ],
        "summary": "Os painéis clientes da API (Sabio Saúde, GoveSUS…) e o que cada um mostra no menu.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PainelCliente"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/paineis/{codigo}": {
      "get": {
        "tags": [
          "Painéis"
        ],
        "summary": "Um painel: os módulos que ele põe no menu. O menu mostra o que o painel lista E o órgão contratou.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PainelCliente"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Painéis"
        ],
        "summary": "Define a lista INTEIRA de módulos que o painel mostra (só o administrador global). Não mexe em contrato.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeMenuDoPainel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PainelCliente"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/municipios": {
      "get": {
        "tags": [
          "Base pública"
        ],
        "parameters": [
          {
            "name": "uf",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "monitorados",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfMunicipioResposta"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/municipios/{ibge}": {
      "get": {
        "tags": [
          "Base pública"
        ],
        "parameters": [
          {
            "name": "ibge",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MunicipioResposta"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/apps/{slug}": {
      "get": {
        "tags": [
          "App da população"
        ],
        "summary": "O app de um município, antes de entrar: o nome, o município, as logomarcas e o número oficial com a mensagem pronta.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDoCidadaoPublico"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/apps/{slug}/manifest.webmanifest": {
      "get": {
        "tags": [
          "App da população"
        ],
        "summary": "O manifesto do app instalável do município (nome, endereço, ícones).",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/cidadao/apps/{slug}/logos/{qual}": {
      "get": {
        "tags": [
          "App da população"
        ],
        "summary": "A logomarca da prefeitura, a da secretaria de saúde ou o brasão do órgão (públicos, como o nome).",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qual",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/cidadao/apps/{slug}/codigo": {
      "post": {
        "tags": [
          "App da população"
        ],
        "summary": "Pede o código de entrar: vai pelo WhatsApp oficial (modelo de autenticação) ou, se falhar, por SMS. A resposta é sempre a mesma.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeCodigoDoApp"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodigoDoAppPedido"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/apps/{slug}/entrar": {
      "post": {
        "tags": [
          "App da população"
        ],
        "summary": "Entrar: o celular, o código que chegou pelo WhatsApp e a data de nascimento de alguém da casa. Devolve o token do aparelho (1 ano, renovado no uso).",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EntradaNoApp"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcessoAoApp"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/eu": {
      "get": {
        "tags": [
          "App da população"
        ],
        "summary": "Quem é da casa (as pessoas deste celular) e com quem falar (a unidade e a agente de saúde).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EuNoApp"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/eu/contato": {
      "put": {
        "tags": [
          "App da população"
        ],
        "summary": "O telefone de contato de quem entrou (quem atende por ele), gravado no cadastro da Saúde.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContatoInformado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EuNoApp"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/dependentes": {
      "get": {
        "tags": [
          "App da população"
        ],
        "summary": "Os dependentes de quem entrou (filhos, quem ele cuida) e as sugestões automáticas (moram na casa, filhos no cadastro).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DependentesNoApp"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/dependentes/sugestoes/{id}": {
      "post": {
        "tags": [
          "App da população"
        ],
        "summary": "Aceita (ou recusa) uma sugestão de dependente.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RespostaASugestao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DependentesNoApp"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/dependentes/{id}": {
      "delete": {
        "tags": [
          "App da população"
        ],
        "summary": "Tira um dependente (ele não volta a ser sugerido).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DependentesNoApp"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/cuidados": {
      "get": {
        "tags": [
          "App da população"
        ],
        "summary": "O acompanhamento de cada pessoa da casa pelas listas do PEC: por ora a gestação (só a de quem entrou), passo a passo — o que foi feito, o que falta e com quem.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CuidadosNoApp"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/remedios": {
      "get": {
        "tags": [
          "App da população"
        ],
        "summary": "O cartão de remédios das pessoas da casa (V0427): o que tomar, como, a última retirada na farmácia, quando pode voltar e a receita.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemediosNoApp"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/remedios/{id}/renovacao": {
      "post": {
        "tags": [
          "App da população"
        ],
        "summary": "Pede a renovação da receita (faltando 15 dias ou menos; um pedido em aberto por remédio). Devolve o cartão.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemediosNoApp"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/consultas": {
      "get": {
        "tags": [
          "App da população"
        ],
        "summary": "As próximas consultas das pessoas da casa.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConsultaNoApp"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/consultas/{id}/resposta": {
      "post": {
        "tags": [
          "App da população"
        ],
        "summary": "\"Vou\" confirma; \"Não vou\" cancela e libera a vaga (no histórico: Paciente, pelo app).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RespostaNoApp"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsultaNoApp"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/marcacao/opcoes": {
      "get": {
        "tags": [
          "App da população"
        ],
        "summary": "Quem da casa pode marcar, o PSF de cada um e com quem (médico ou enfermeiro ligado para o app).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpcoesDeMarcacao"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/marcacao/dias": {
      "get": {
        "tags": [
          "App da população"
        ],
        "summary": "Os próximos dias com vaga do app (até 15), com quantos horários de manhã e de tarde.",
        "parameters": [
          {
            "name": "pessoa",
            "in": "query",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          {
            "name": "profissional",
            "in": "query",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DiaParaMarcar"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/marcacao/horarios": {
      "get": {
        "tags": [
          "App da população"
        ],
        "summary": "Os horários livres de um turno (manha ou tarde) daquele dia.",
        "parameters": [
          {
            "name": "pessoa",
            "in": "query",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          {
            "name": "profissional",
            "in": "query",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          {
            "name": "dia",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "turno",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HorariosParaMarcar"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/marcacao": {
      "post": {
        "tags": [
          "App da população"
        ],
        "summary": "Marca a consulta (já confirmada). Fora do PSF da pessoa: 403 fora_da_sua_unidade; uma em aberto por pessoa e profissional.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarcacaoNoApp"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsultaMarcadaNoApp"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/civi": {
      "get": {
        "tags": [
          "App da população"
        ],
        "summary": "Se a Civi conversa hoje (há chave, cabe no limite do dia e no teto do mês) ou só oferece os botões.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SituacaoDaCivi"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "App da população"
        ],
        "summary": "Uma mensagem para a Civi (o app manda a conversa inteira). Horários oferecidos voltam como botões; soBotoes quando a IA não está disponível.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoACivi"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespostaDaCivi"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/push/chave": {
      "get": {
        "tags": [
          "App da população"
        ],
        "summary": "A chave pública das notificações (VAPID); nula quando o servidor não manda notificação.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/cidadao/push": {
      "post": {
        "tags": [
          "App da população"
        ],
        "summary": "Este aparelho aceitou receber notificações (a inscrição do navegador).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InscricaoDePush"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/cidadao/avisos": {
      "get": {
        "tags": [
          "App da população"
        ],
        "summary": "Os avisos da Saúde para as pessoas da casa (60 dias), com os botões de resposta.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvisoNoApp"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/avisos/vistos": {
      "post": {
        "tags": [
          "App da população"
        ],
        "summary": "A pessoa abriu o app: os avisos ficam vistos — a notificação para de repetir e o selo do ícone zera (V0434).",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/cidadao/avisos/{id}/lido": {
      "post": {
        "tags": [
          "App da população"
        ],
        "summary": "Marca o aviso como lido (a equipe vê).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/cidadao/avisos/{id}/resposta": {
      "post": {
        "tags": [
          "App da população"
        ],
        "summary": "A resposta de um toque (Vou / Não vou, Ciente…). A da consulta confirma ou desmarca na Agenda.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RespostaAoAviso"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvisoNoApp"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/mensagens": {
      "get": {
        "tags": [
          "App da população"
        ],
        "summary": "As mensagens que a Saúde mandou para este celular (90 dias).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MensagemNoApp"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cidadao/sair": {
      "post": {
        "tags": [
          "App da população"
        ],
        "summary": "Desliga este aparelho.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/transporte/veiculos": {
      "get": {
        "tags": [
          "Transporte · Veículos"
        ],
        "summary": "Veículos do órgão, ativos primeiro. situacao: ativos, inativos ou todos (padrão).",
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfVeiculoDaFrota"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Transporte · Veículos"
        ],
        "summary": "Ocupação conta o motorista: um carro de 5 lugares leva 4 passageiros.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VeiculoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/transporte/veiculos/contagem": {
      "get": {
        "tags": [
          "Transporte · Veículos"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContagemDoCadastro"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/veiculos/{id}": {
      "put": {
        "tags": [
          "Transporte · Veículos"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VeiculoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VeiculoDaFrota"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/veiculos/{id}/situacao": {
      "put": {
        "tags": [
          "Transporte · Veículos"
        ],
        "summary": "Desativar tira o veículo da montagem; as viagens dele continuam registradas.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeSituacao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VeiculoDaFrota"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/motoristas": {
      "get": {
        "tags": [
          "Transporte · Motoristas"
        ],
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfMotoristaDaFrota"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Transporte · Motoristas"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MotoristaEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/transporte/motoristas/contagem": {
      "get": {
        "tags": [
          "Transporte · Motoristas"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContagemDoCadastro"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/motoristas/{id}": {
      "put": {
        "tags": [
          "Transporte · Motoristas"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MotoristaEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotoristaDaFrota"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/motoristas/{id}/situacao": {
      "put": {
        "tags": [
          "Transporte · Motoristas"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeSituacao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotoristaDaFrota"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/pacientes": {
      "get": {
        "tags": [
          "Transporte · Pacientes"
        ],
        "summary": "Busca sem letra casa por trecho do CPF ou do CNS; com letra, pelo nome ou pelo nome da mãe, sem acento. situacao padrão: ativos.",
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfPacienteDoCadastro"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Transporte · Pacientes"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PacienteEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/transporte/pacientes/contagem": {
      "get": {
        "tags": [
          "Transporte · Pacientes"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContagemDoCadastro"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/pacientes/importacao": {
      "post": {
        "tags": [
          "Transporte · Pacientes"
        ],
        "summary": "Um lote (até 1000) da base de pessoas do município. Reimportar não duplica: reconhece pelo CPF, pelo CNS ou por nome + nascimento + mãe, e completa sem apagar.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportacaoDePacientesEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultadoDaImportacao"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/pacientes/{id}": {
      "get": {
        "tags": [
          "Transporte · Pacientes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PacienteDoCadastro"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Transporte · Pacientes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PacienteEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PacienteDoCadastro"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/pacientes/{id}/telefones": {
      "put": {
        "tags": [
          "Transporte · Pacientes"
        ],
        "summary": "Só os telefones — o que a recepção grava a partir da marcação.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TelefonesEnviados"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PacienteDoCadastro"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/pacientes/{id}/situacao": {
      "put": {
        "tags": [
          "Transporte · Pacientes"
        ],
        "summary": "Desativado sai da busca da marcação; o cadastro fica guardado.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeSituacao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PacienteDoCadastro"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/marcacoes": {
      "get": {
        "tags": [
          "Transporte · Marcação"
        ],
        "summary": "Marcações do período pela hora da consulta. Sem período: de hoje a 30 dias. situacao: AguardandoCarro, EmMontagem, Confirmado, Realizado, Cancelado.",
        "parameters": [
          {
            "name": "de",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "ate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfMarcacao"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Transporte · Marcação"
        ],
        "summary": "Marca e já encaixa: o sistema remonta o dia e a cidade nos carros livres.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarcacaoEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/transporte/marcacoes/resumo": {
      "get": {
        "tags": [
          "Transporte · Marcação"
        ],
        "summary": "Marcações, pessoas e sem carro no período; e o cabeçalho de cada dia da lista filtrada.",
        "parameters": [
          {
            "name": "de",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "ate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResumoDasMarcacoes"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/marcacoes/cidades": {
      "get": {
        "tags": [
          "Transporte · Marcação"
        ],
        "summary": "Cidades já usadas e os locais de cada uma — sugestões do formulário.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CidadeUsada"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/marcacoes/{id}": {
      "get": {
        "tags": [
          "Transporte · Marcação"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Marcacao"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Transporte · Marcação"
        ],
        "summary": "Tira da viagem atual, altera e remonta. Viagem confirmada que perde o paciente fica para revisão.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarcacaoEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Marcacao"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/marcacoes/{id}/viagem": {
      "post": {
        "tags": [
          "Transporte · Marcação"
        ],
        "summary": "Põe o paciente noutra viagem do mesmo dia (ou numa viagem, se estava sem carro). Lotação conferida.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MovimentoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViagemDaFrota"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/marcacoes/{id}/cancelamento": {
      "post": {
        "tags": [
          "Transporte · Marcação"
        ],
        "summary": "O paciente sai da viagem e o lugar no carro fica livre.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelamentoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Marcacao"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/viagens": {
      "get": {
        "tags": [
          "Transporte · Viagens"
        ],
        "summary": "Viagens do período pela saída. Sem período: a próxima semana. situacao: Proposta, Agendada, Concluida, Cancelada; dia: só um dia do período; comVaga: só as abertas com lugar.",
        "parameters": [
          {
            "name": "de",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "ate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "motoristaId",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          {
            "name": "veiculoId",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dia",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "comVaga",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfViagemDaFrota"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Transporte · Viagens"
        ],
        "summary": "Lançamento à mão: já nasce agendada. Carro ou motorista em horário sobreposto é 409 conflito_de_horario.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ViagemEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/transporte/viagens/resumo": {
      "get": {
        "tags": [
          "Transporte · Viagens"
        ],
        "summary": "Totais, o contador de propostas a confirmar e, por dia, viagens, pacientes e os motoristas livres.",
        "parameters": [
          {
            "name": "de",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "ate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "motoristaId",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          {
            "name": "veiculoId",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResumoDasViagens"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/viagens/{id}": {
      "get": {
        "tags": [
          "Transporte · Viagens"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViagemDaFrota"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Transporte · Viagens"
        ],
        "summary": "Edição completa. Paciente de marcação tirado da viagem volta a aguardar carro, e o dia é remontado.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ViagemEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViagemDaFrota"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/viagens/{id}/motoristas": {
      "get": {
        "tags": [
          "Transporte · Viagens"
        ],
        "summary": "Quem pode dirigir: livres no dia primeiro, depois quem rodou menos no mês.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MotoristaParaViagem"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/viagens/{id}/conclusao": {
      "get": {
        "tags": [
          "Transporte · Viagens"
        ],
        "summary": "Sugestões para concluir: o km em que o carro parou na viagem anterior e o retorno previsto.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SugestaoDeConclusao"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Transporte · Viagens"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConclusaoEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViagemDaFrota"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/viagens/{id}/avisos": {
      "get": {
        "tags": [
          "Transporte · Viagens"
        ],
        "summary": "A janela de avisos: quem está na viagem, o telefone, o que já recebeu e a mensagem que vai receber. Nada sai daqui.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JanelaDeAvisos"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Transporte · Viagens"
        ],
        "summary": "Avisa pelo WhatsApp as pessoas marcadas (chaves da janela). Com saida, acerta antes a hora de saída da viagem. Exige o módulo Comunicação.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AvisosPedidos"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultadoDosAvisos"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/viagens/{id}/saida-avisada": {
      "post": {
        "tags": [
          "Transporte · Viagens"
        ],
        "summary": "No dia da viagem: avisa os pacientes que o carro está saindo — pelo app quem o usa, pelo WhatsApp quem não. Quem já recebeu não recebe de novo. Exige o módulo Comunicação.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultadoDosAvisos"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/viagens/{id}/confirmacao": {
      "post": {
        "tags": [
          "Transporte · Viagens"
        ],
        "summary": "A proposta do sistema vira viagem: motorista e saída. A recepção passa a ver a hora.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmacaoEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViagemDaFrota"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/viagens/{id}/revisada": {
      "post": {
        "tags": [
          "Transporte · Viagens"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViagemDaFrota"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transporte/viagens/{id}/cancelamento": {
      "post": {
        "tags": [
          "Transporte · Viagens"
        ],
        "summary": "Não cancela as marcações: os pacientes voltam a aguardar carro e o dia é remontado.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelamentoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViagemDaFrota"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/comunicacao/mensagens": {
      "get": {
        "tags": [
          "Comunicação"
        ],
        "summary": "As mensagens do órgão, das mais novas. situacao: NaFila, Enviada, Entregue, Lida ou Falhou. O profissional da saúde: só as dos pacientes da agenda dele.",
        "parameters": [
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfMensagemDaCaixa"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/comunicacao/mensagens/{id}/reenvio": {
      "post": {
        "tags": [
          "Comunicação"
        ],
        "summary": "Tenta de novo a mensagem que falhou.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MensagemDaCaixa"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/recepcao/modelos": {
      "get": {
        "tags": [
          "Recepção"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ModeloDeAviso"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Recepção"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModeloEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/recepcao/modelos/{id}": {
      "delete": {
        "tags": [
          "Recepção"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/recepcao/avisos": {
      "post": {
        "tags": [
          "Recepção"
        ],
        "summary": "Aviso avulso pelo WhatsApp (\"o resultado do seu exame chegou\"). O profissional da saúde: só aos pacientes da agenda dele.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AvisoAvulso"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MensagemDaCaixa"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/recepcao/pacientes": {
      "get": {
        "tags": [
          "Recepção"
        ],
        "summary": "Pacientes que já passaram pela recepção, com o telefone mais recente — para não digitar de novo.",
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PacienteConhecido"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/grade": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "summary": "Um dia ou uma semana (até 31 dias): quem atende, o expediente semanal, os bloqueios e os agendamentos. O profissional da saúde recebe só a dele.",
        "parameters": [
          {
            "name": "de",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "ate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "unidadeId",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          {
            "name": "profissionalId",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GradeDaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/horarios-livres": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "summary": "Os horários que cabem inteiros no expediente, sem conflito com agendamento ou bloqueio.",
        "parameters": [
          {
            "name": "profissionalId",
            "in": "query",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          {
            "name": "unidadeId",
            "in": "query",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          {
            "name": "dia",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "duracaoMinutos",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "servicoId",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HorariosLivres"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/pec": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "summary": "A leitura automática da agenda do e-SUS PEC: se está ligada, os horários e a última rodada (e a última que deu certo). Só o administrador global (403 so_administrador).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgendaDoPec"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/pec/leitura": {
      "post": {
        "tags": [
          "Agenda"
        ],
        "summary": "Lê a agenda do e-SUS PEC agora, sem esperar o próximo horário. Só o administrador global (403 so_administrador); 409 pec_nao_configurado quando o órgão não tem PEC ligado.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgendaDoPec"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/importacoes": {
      "post": {
        "tags": [
          "Agenda"
        ],
        "summary": "Importa a agenda do e-SUS PEC (planilha) na grade: paciente, data, hora, telefone, profissional e unidade. Profissional e unidade precisam estar cadastrados; reimportar não duplica.",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "arquivo": {
                        "$ref": "#/components/schemas/IFormFile"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "unidadeId": {
                        "pattern": "^-?(?:0|[1-9]\\d*)$",
                        "type": [
                          "integer",
                          "string"
                        ],
                        "format": "int64"
                      }
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportacaoNaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/confirmacoes": {
      "post": {
        "tags": [
          "Agenda"
        ],
        "summary": "Envia pelo WhatsApp o pedido de confirmação dos agendamentos escolhidos. \"1\" confirma; \"2\" cancela e libera a vaga.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeConfirmacao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultadoDoAviso"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/areas": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AreaDeAtendimento"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/minhas-unidades": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "summary": "As unidades da sessão: todas = true, ou a lista a que a conta se prende (a recepção e a gestão da saúde marcadas).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnidadesDaConta"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/contas/{codigo}/unidades": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "summary": "As unidades marcadas numa conta. Só quem administra as contas.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnidadesDaConta"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Agenda"
        ],
        "summary": "Troca as unidades da conta (recepção ou gestão da saúde); vazia = todas. Só quem administra as contas.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeUnidadesDaConta"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnidadesDaConta"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/configuracoes/avisos": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfiguracaoDosAvisosVista"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Agenda"
        ],
        "summary": "As áreas sensíveis (V0451): o aviso que vai a outra pessoa da casa não diz o profissional nem a especialidade.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfiguracaoDosAvisosEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfiguracaoDosAvisosVista"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/agendamentos/{id}": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgendamentoDaAgenda"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Agenda"
        ],
        "summary": "Edita o telefone de contato (vazio = o do paciente) e a observação, sem mexer no horário. Vai ao histórico.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EdicaoDoAgendamento"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgendamentoDaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/agendamentos": {
      "post": {
        "tags": [
          "Agenda"
        ],
        "summary": "Marca. Horário ocupado (outro atendimento — também o que veio do PEC — ou bloqueio do profissional) é 409; fora do expediente vira encaixe. \"telefoneContato\": outro número para este agendamento. Vai ao histórico com quem marcou.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgendamentoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/agenda/agendamentos/{id}/historico": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "summary": "Quem marcou, remarcou, editou, confirmou, cancelou — e o que veio da leitura do PEC, da planilha e do WhatsApp.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ItemDoHistoricoDaAgenda"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/agendamentos/{id}/horario": {
      "put": {
        "tags": [
          "Agenda"
        ],
        "summary": "Remarca (outro horário, profissional ou unidade). A confirmação anterior deixa de valer.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemarcacaoEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgendamentoDaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/agendamentos/{id}/cancelamento": {
      "put": {
        "tags": [
          "Agenda"
        ],
        "summary": "Cancela, sempre com o motivo. O horário fica livre.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelamentoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgendamentoDaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/agendamentos/{id}/contato-resolvido": {
      "put": {
        "tags": [
          "Agenda"
        ],
        "summary": "Dá por resolvido o \"pediu contato\" (a resposta ao WhatsApp que não foi sim nem não). Vai ao histórico.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgendamentoDaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/agendamentos/{id}/avisos": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "summary": "Os avisos do atendimento (V0451): a quem foi, por qual canal, o estado e o SMS de reserva.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvisoDaEscadaVisto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/agendamentos/{id}/situacao": {
      "put": {
        "tags": [
          "Agenda"
        ],
        "summary": "Confirmado, Chegou, EmAtendimento, Realizado ou Faltou.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PassagemEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgendamentoDaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/profissionais": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "summary": "Quem atende (toda área menos Transporte). situacao: ativos (padrão), inativos ou todos.",
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfProfissionalDaAgenda"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agenda"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfissionalEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/agenda/profissionais/{id}": {
      "put": {
        "tags": [
          "Agenda"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfissionalEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfissionalDaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/profissionais/{id}/situacao": {
      "put": {
        "tags": [
          "Agenda"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeSituacao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfissionalDaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/profissionais/{id}/conta": {
      "put": {
        "tags": [
          "Agenda"
        ],
        "summary": "Liga a conta (papel Profissional da saúde, do mesmo órgão) a este profissional: a pessoa passa a ver a própria agenda. Com {celular}: liga a conta de profissional com este celular ou CRIA uma (sem senha; a pessoa entra pelo código do WhatsApp).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeContaDoProfissional"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfissionalDaAgenda"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Agenda"
        ],
        "summary": "Desliga a conta deste profissional.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfissionalDaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/profissionais/{id}/foto": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "summary": "A foto do profissional (PNG, JPEG ou WebP). 404 quando não há.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Agenda"
        ],
        "summary": "Envia (ou troca) a foto: multipart, campo \"arquivo\". PNG, JPEG ou WebP, até 2 MB. O formato sai dos bytes; SVG é recusado.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "arquivo": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfissionalDaAgenda"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Agenda"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfissionalDaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/profissionais/{id}/app": {
      "put": {
        "tags": [
          "Agenda"
        ],
        "summary": "Liga (ou desliga) a marcação pelo app da população e as vagas do app por turno.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarcacaoPeloAppEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfissionalDaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/profissionais/{id}/expediente": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FaixaDeExpediente"
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Agenda"
        ],
        "summary": "Grava o expediente semanal inteiro: as faixas enviadas substituem as de antes.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpedienteEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FaixaDeExpediente"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/unidades": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "parameters": [
          {
            "name": "todas",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UnidadeDaAgenda"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agenda"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnidadeEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/agenda/unidades/{id}": {
      "put": {
        "tags": [
          "Agenda"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnidadeEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnidadeDaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/unidades/{id}/situacao": {
      "put": {
        "tags": [
          "Agenda"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeSituacao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnidadeDaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/servicos": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "parameters": [
          {
            "name": "todos",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ServicoDaAgenda"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agenda"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServicoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/agenda/servicos/{id}": {
      "put": {
        "tags": [
          "Agenda"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServicoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServicoDaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/servicos/{id}/situacao": {
      "put": {
        "tags": [
          "Agenda"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeSituacao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServicoDaAgenda"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/bloqueios": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "parameters": [
          {
            "name": "profissionalId",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BloqueioDaAgenda"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agenda"
        ],
        "summary": "Folga, férias, reunião. Período com atendimento marcado é 409.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BloqueioEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/agenda/bloqueios/{id}": {
      "delete": {
        "tags": [
          "Agenda"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/agenda/pacientes": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "summary": "O cadastro único de pacientes (o mesmo da Marcação do Transporte). situacao padrão: ativos.",
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfPacienteDoCadastro"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agenda"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PacienteEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/agenda/pacientes/contagem": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContagemDoCadastro"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/pacientes/importacao": {
      "post": {
        "tags": [
          "Agenda"
        ],
        "summary": "A base de pessoas do município, em lotes (até 1000). Reimportar não duplica.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportacaoDePacientesEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultadoDaImportacao"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/pacientes/{id}": {
      "put": {
        "tags": [
          "Agenda"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PacienteEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PacienteDoCadastro"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Agenda"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PacienteDoCadastro"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/pacientes/{id}/situacao": {
      "put": {
        "tags": [
          "Agenda"
        ],
        "summary": "Desativado sai da busca da marcação; o cadastro fica guardado.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeSituacao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PacienteDoCadastro"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/pacientes/{id}/avisos": {
      "get": {
        "tags": [
          "Agenda"
        ],
        "summary": "O histórico de avisos do paciente (V0451).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvisoDaEscadaVisto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agenda/pacientes/{id}/telefones": {
      "put": {
        "tags": [
          "Agenda"
        ],
        "summary": "Grava os TRÊS campos (telefone, contato e nome do contato): quem só troca o telefone reenvia os outros dois como estão.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TelefonesEnviados"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PacienteDoCadastro"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/telefones/painel": {
      "get": {
        "tags": [
          "Campanha do telefone"
        ],
        "summary": "Casas com telefone válido (a meta mínima) e pacientes com celular próprio, por equipe e microárea, e a evolução por dia.",
        "parameters": [
          {
            "name": "equipe",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PainelDosTelefones"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/telefones/casas-sem-telefone": {
      "get": {
        "tags": [
          "Campanha do telefone"
        ],
        "summary": "As casas sem nenhum telefone válido, para o mutirão. A gestão vê todas; a ACS, só as da microárea dela (as outras: 403).",
        "parameters": [
          {
            "name": "equipe",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfCasaSemTelefone"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/telefones/casa": {
      "put": {
        "tags": [
          "Campanha do telefone"
        ],
        "summary": "O telefone da casa (e um segundo, opcional). Prevalece sobre o do PEC. A ACS só nas casas da microárea dela.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TelefoneDaCasaEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CasaDoPaciente"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/telefones/genericos": {
      "get": {
        "tags": [
          "Campanha do telefone"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TelefoneGenericoDaLista"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Campanha do telefone"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TelefoneGenericoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/telefones/fichas": {
      "get": {
        "tags": [
          "Campanha do telefone"
        ],
        "summary": "As fichas de campo de uma microárea: uma por casa, com o código da casa e de cada morador. todas=false: só as casas com pendência.",
        "parameters": [
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "todas",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FichaDaCasa"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/telefones/fichas/modelo.csv": {
      "get": {
        "tags": [
          "Campanha do telefone"
        ],
        "summary": "O modelo da planilha da volta das fichas (código, telefone, de quem, parentesco, segundo, não tem, contato).",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/telefones/fichas/importacao": {
      "post": {
        "tags": [
          "Campanha do telefone"
        ],
        "summary": "A volta das fichas: casa SÓ pelo código impresso (da casa ou da pessoa). confirmar=false é a prévia (nada se grava); true grava as válidas.",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "arquivo": {
                        "$ref": "#/components/schemas/IFormFile"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "coletadoPor": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "coletadoEm": {
                        "type": "string",
                        "format": "date"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "confirmar": {
                        "type": "boolean"
                      }
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportacaoDasFichas"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/telefones/genericos/sugestoes": {
      "get": {
        "tags": [
          "Campanha do telefone"
        ],
        "summary": "Números repetidos em mais de 5 pacientes de casas diferentes: talvez sejam do posto.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SugestaoDeGenerico"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/telefones/genericos/{id}": {
      "delete": {
        "tags": [
          "Campanha do telefone"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/auriculoterapia/acesso": {
      "get": {
        "tags": [
          "Auriculoterapia"
        ],
        "summary": "Se a auriculoterapia aparece no menu: a gestão, ou o profissional da área \"Práticas integrativas\".",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnonymousTypeOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auriculoterapia/catalogo": {
      "get": {
        "tags": [
          "Auriculoterapia"
        ],
        "summary": "Os pontos do mapa, os materiais, as contraindicações, as reações, os motivos de alta e os protocolos-modelo.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogoDeAuriculo"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auriculoterapia/tratamentos": {
      "get": {
        "tags": [
          "Auriculoterapia"
        ],
        "summary": "Os pacientes em tratamento: os do profissional; a gestão vê de todos.",
        "parameters": [
          {
            "name": "comAlta",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TratamentoDeAuriculoDaLista"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Auriculoterapia"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TratamentoDeAuriculoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FichaDeAuriculo"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auriculoterapia/pacientes/{id}": {
      "get": {
        "tags": [
          "Auriculoterapia"
        ],
        "summary": "A ficha do paciente: o tratamento aberto (com as sessões e o mapa), os anteriores e a sessão que vem (n de N, a orelha, o atendimento de hoje).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "agendamentoId",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FichaDeAuriculo"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auriculoterapia/tratamentos/{id}": {
      "put": {
        "tags": [
          "Auriculoterapia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TratamentoDeAuriculoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FichaDeAuriculo"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auriculoterapia/tratamentos/{id}/sessoes": {
      "post": {
        "tags": [
          "Auriculoterapia"
        ],
        "summary": "Registra a sessão (o número sai sozinho). Com agendamentoId, nasce do atendimento da Agenda.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessaoDeAuriculoEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FichaDeAuriculo"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auriculoterapia/sessoes/{id}": {
      "put": {
        "tags": [
          "Auriculoterapia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessaoDeAuriculoEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FichaDeAuriculo"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Auriculoterapia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FichaDeAuriculo"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auriculoterapia/tratamentos/{id}/alta": {
      "put": {
        "tags": [
          "Auriculoterapia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AltaDeAuriculoEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FichaDeAuriculo"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auriculoterapia/tratamentos/{id}/orientacao": {
      "get": {
        "tags": [
          "Auriculoterapia"
        ],
        "summary": "A orientação para casa, para imprimir.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Auriculoterapia"
        ],
        "summary": "Manda a orientação para casa ao app da população (409 sem_app: o paciente não usa o app).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/auriculoterapia/protocolos": {
      "post": {
        "tags": [
          "Auriculoterapia"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProtocoloDeAuriculoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProtocoloDeAuriculoDaLista"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auriculoterapia/protocolos/{id}": {
      "put": {
        "tags": [
          "Auriculoterapia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProtocoloDeAuriculoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProtocoloDeAuriculoDaLista"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Auriculoterapia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/pacientes/{id}/telefone-da-vez": {
      "get": {
        "tags": [
          "Pacientes"
        ],
        "summary": "O que a janela \"Atualize o telefone\" precisa: se o celular falta e por quê, a casa e os telefones dos moradores.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelefoneDaVez"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Grava o celular (e o contato), ou \"não tem telefone\" (90 dias sem perguntar), e o telefone da casa. Vai ao histórico.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AtualizacaoDoTelefone"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelefoneDaVez"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes": {
      "get": {
        "tags": [
          "Pacientes"
        ],
        "summary": "O cadastro único de pacientes (o mesmo da Agenda e do Transporte). Sem letra: CPF ou CNS; com letra: nome ou mãe. situacao padrão: ativos. aniversario: hoje, semana ou mes (na ordem do dia). microarea: só quem mora nela.",
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "aniversario",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "app",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfPacienteDoCadastro"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Pacientes"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PacienteEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/pacientes/aniversariantes": {
      "get": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Quem faz aniversário (periodo: hoje, semana ou mes; padrão semana). A ACS só vê a microárea dela.",
        "parameters": [
          {
            "name": "periodo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfPacienteDoCadastro"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/aniversariantes/envios": {
      "get": {
        "tags": [
          "Pacientes"
        ],
        "summary": "O que aconteceu com o aniversário de cada um neste ano: enviado (às 9h ou por quem), ou por que não.",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnvioDoAniversario"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/aniversariantes/envio": {
      "get": {
        "tags": [
          "Pacientes"
        ],
        "summary": "A prévia do \"Enviar a todos\" (hoje ou ontem): quantos recebem o banner, quem fica de fora e por quê, e o modo de teste.",
        "parameters": [
          {
            "name": "periodo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviaDosParabens"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Manda o banner aos aniversariantes do dia que ficaram de fora (um envio só por pessoa e aniversário; o profissional, só os dele).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvioDosParabens"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultadoDoAviso"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/aniversariantes/parabens": {
      "post": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Os parabéns pelo WhatsApp (até 100 por vez; {nome} vira o primeiro nome). Uma vez por ano por pessoa; respeita o modo de teste. Precisa da Comunicação.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeParabens"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultadoDoAviso"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/contagem": {
      "get": {
        "tags": [
          "Pacientes"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContagemDoCadastro"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/{id}": {
      "get": {
        "tags": [
          "Pacientes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PacienteDoCadastro"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Pacientes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PacienteEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PacienteDoCadastro"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/{id}/telefones": {
      "put": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Os TRÊS campos (telefone, contato e nome do contato). De qualquer tela, também da farmácia.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TelefonesEnviados"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PacienteDoCadastro"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/{id}/situacao": {
      "put": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Desativado sai da busca das marcações; o cadastro fica guardado. Só a gestão.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeSituacao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PacienteDoCadastro"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/importacao": {
      "post": {
        "tags": [
          "Pacientes"
        ],
        "summary": "A base de pessoas do município, em lotes (até 1000). Reimportar não duplica. Só a gestão.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportacaoDePacientesEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultadoDaImportacao"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/{id}/contatos": {
      "get": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Os contatos do paciente (quem atende por ele), na ordem.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ContatoDoPacienteDto"
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Grava a lista INTEIRA de contatos (até 10). Com contatoPacienteId, nome e telefone vazios vêm do cadastro. O primeiro com telefone vira o telefone de contato do paciente (o que a Agenda e o Transporte usam).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ContatoEnviado"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ContatoDoPacienteDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/{id}/app": {
      "get": {
        "tags": [
          "Pacientes"
        ],
        "summary": "O app da população deste paciente (V0413): se usa (os aparelhos), quem ele cuida e quem cuida dele.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDoPaciente"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/{id}/dependentes": {
      "post": {
        "tags": [
          "Pacientes"
        ],
        "summary": "A equipe vincula um dependente a este paciente (a criança, o idoso que ele cuida).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VinculoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDoPaciente"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/{id}/dependentes/{dependente}": {
      "delete": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Desfaz o vínculo.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "dependente",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDoPaciente"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/{id}/app/teste": {
      "post": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Manda um aviso de teste ao app do paciente (a notificação chega?).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDoPaciente"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/{id}/app/desligar": {
      "post": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Desliga os aparelhos do paciente (celular perdido ou trocado).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDoPaciente"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/{id}/remedios": {
      "get": {
        "tags": [
          "Pacientes"
        ],
        "summary": "O cartão de remédios do paciente: os remédios de uso contínuo (os ativos primeiro), a última retirada, quando pode voltar e as retiradas.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartaoDeRemedios"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Inclui um remédio no cartão (422 remedio_repetido quando o mesmo já está ativo). Devolve o cartão.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemedioEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartaoDeRemedios"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/{id}/remedios/{remedio}": {
      "put": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Altera o remédio (ativo=false suspende; fica no histórico). Devolve o cartão.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "remedio",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemedioEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartaoDeRemedios"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/{id}/retiradas": {
      "post": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Lança a retirada de hoje (ou da data) dos remédios marcados; o mesmo dia de novo não duplica. Devolve o cartão.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetiradaEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartaoDeRemedios"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/{id}/retiradas/{retirada}": {
      "delete": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Desfaz uma retirada lançada nos últimos 7 dias (409 retirada_antiga). Devolve o cartão.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "retirada",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartaoDeRemedios"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pacientes/{id}/domicilio": {
      "get": {
        "tags": [
          "Pacientes"
        ],
        "summary": "A casa do paciente e quem mora com ele — o telefone de alguém da casa quando o dele falta. {domicilio: null} sem casa.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomicilioDoPaciente"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/farmacia/renovacoes": {
      "get": {
        "tags": [
          "Pacientes"
        ],
        "summary": "A fila dos pedidos de renovação da receita: situacao abertas (padrão, as mais antigas primeiro) ou respondidas.",
        "parameters": [
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfRenovacaoNaFila"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/farmacia/renovacoes/{id}": {
      "put": {
        "tags": [
          "Pacientes"
        ],
        "summary": "Responde: Renovada (com receitaAte, que vai para o cartão) ou PrecisaConsulta. A resposta chega no app.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RespostaARenovacao"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RenovacaoNaFila"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/configuracoes/aniversario": {
      "get": {
        "tags": [
          "Pacientes · Configurações"
        ],
        "summary": "Os textos do aniversário do órgão (V0410): a mensagem do banner, os parabéns pelo WhatsApp e o modelo preferido. Nulos = os de fábrica. Todos leem; alterar é da gestão.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfiguracoesDoAniversario"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Pacientes · Configurações"
        ],
        "summary": "Altera os textos do aniversário. Só o administrador e o gestor do órgão (403 so_gestor).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfiguracoesDoAniversarioEnviadas"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfiguracoesDoAniversario"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/configuracoes/app": {
      "get": {
        "tags": [
          "Pacientes · Configurações"
        ],
        "summary": "O app da população do órgão (V0411): o nome e o endereço. 204 quando ainda não foi criado.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Pacientes · Configurações"
        ],
        "summary": "Cria ou altera o app da população (nome, endereço, ligado). Só o administrador e o gestor do órgão.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfiguracaoDoAppEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfiguracaoDoAppDoCidadao"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/recados": {
      "get": {
        "tags": [
          "Pacientes · Recados do app"
        ],
        "summary": "Os recados enviados pelo app: para quem, quantas pessoas, quantas leram e quantas responderam.",
        "parameters": [
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfRecadoDoApp"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Pacientes · Recados do app"
        ],
        "summary": "Envia o recado (ou a campanha de vacina) pelo app a todos, a uma microárea, às gestantes ou a uma faixa de idade. Só pelo app.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecadoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/recados/alcance": {
      "post": {
        "tags": [
          "Pacientes · Recados do app"
        ],
        "summary": "Quantas pessoas o recado alcança no app, antes de enviar. Nada sai daqui.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecadoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlcanceDoRecado"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gestantes": {
      "get": {
        "tags": [
          "Pacientes · Gestantes"
        ],
        "summary": "As gestantes e puérperas do acompanhamento do e-SUS PEC (V0409), com a semana de HOJE e o que falta pelas boas práticas; as urgentes primeiro. fase=gestantes|puerperas; pendencia=<código>; quem=Acs|Equipe; lembrete=pode (dá para lembrar pelo app agora)|ja_fez (respondeu \"Já fiz\" e o PEC ainda não registra).",
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fase",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pendencia",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quem",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lembrete",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfGestanteDoAcompanhamento"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gestantes/{id}/lembrete": {
      "post": {
        "tags": [
          "Pacientes · Gestantes"
        ],
        "summary": "Lembra a gestante pelo app (V0417) do que o PEC não registra e ela resolve na unidade; ela responde Vou marcar ou Já fiz. 409: sem_cadastro, nada_a_lembrar, sem_app, lembrada_ha_pouco (uma vez a cada 7 dias).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GestanteDoAcompanhamento"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gestantes/lembretes/alcance": {
      "post": {
        "tags": [
          "Pacientes · Gestantes"
        ],
        "summary": "Quantas gestantes (todas, ou de uma microárea) o lembrete alcançaria agora. Nada sai daqui.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeLembretes"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LembretesDoPreNatal"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gestantes/lembretes": {
      "post": {
        "tags": [
          "Pacientes · Gestantes"
        ],
        "summary": "Lembra pelo app todas as que podem ser lembradas agora (no app, com o que lembrar, não lembradas nos últimos 7 dias). 409 ninguem_para_lembrar.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeLembretes"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LembretesDoPreNatal"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gestantes/{id}/prontuario": {
      "get": {
        "tags": [
          "Pacientes · Gestantes"
        ],
        "summary": "O prontuário dela no e-SUS PEC (V0438), lido AO VIVO na lotação da unidade dela e guardado. Com o PEC ocupado ou fora, a última cópia (aoVivo=false, falha=o que houve). clinico=null: o PEC não deixa a conta do Sábio Saúde ler a parte clínica. Cópia de menos de 5 minutos volta sem chamar o PEC, salvo atualizar=true.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "atualizar",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProntuarioDoPec"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gestantes/resumo": {
      "get": {
        "tags": [
          "Pacientes · Gestantes"
        ],
        "summary": "Os totais, cada microárea com a ACS, as pendências mais comuns e a última leitura do PEC.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResumoDasGestantes"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/hipertensos": {
      "get": {
        "tags": [
          "Pacientes · Hipertensos e diabéticos"
        ],
        "summary": "Os hipertensos do acompanhamento do e-SUS PEC (V0418), com o que falta pelas boas práticas (consulta e pressão em 6 meses; 2 visitas da ACS, peso e altura em 12; no diabético, hemoglobina glicada e pés); as urgentes (mais de um ano sem consulta) primeiro. situacao=pendentes|em_dia|pressao_alta; pendencia=<código>; quem=Acs|Equipe.",
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pendencia",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quem",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfCronicoDoAcompanhamento"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/hipertensos/resumo": {
      "get": {
        "tags": [
          "Pacientes · Hipertensos e diabéticos"
        ],
        "summary": "O quadro dos hipertensos: totais, em dia, cada microárea com a ACS, as pendências mais comuns e a última leitura do PEC.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResumoDosCronicos"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/diabeticos": {
      "get": {
        "tags": [
          "Pacientes · Hipertensos e diabéticos"
        ],
        "summary": "Os diabeticos do acompanhamento do e-SUS PEC (V0418), com o que falta pelas boas práticas (consulta e pressão em 6 meses; 2 visitas da ACS, peso e altura em 12; no diabético, hemoglobina glicada e pés); as urgentes (mais de um ano sem consulta) primeiro. situacao=pendentes|em_dia|pressao_alta; pendencia=<código>; quem=Acs|Equipe.",
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pendencia",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quem",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfCronicoDoAcompanhamento"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/diabeticos/resumo": {
      "get": {
        "tags": [
          "Pacientes · Hipertensos e diabéticos"
        ],
        "summary": "O quadro dos diabeticos: totais, em dia, cada microárea com a ACS, as pendências mais comuns e a última leitura do PEC.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResumoDosCronicos"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/criancas": {
      "get": {
        "tags": [
          "Pacientes · Crianças"
        ],
        "summary": "As crianças de 0 a 4 anos do desenvolvimento infantil do e-SUS PEC (V0419), com a idade de HOJE e o que falta pelas boas práticas (1ª consulta até 30 dias, consultas e peso/altura da idade, visitas da ACS, vacinas atrasadas); as urgentes primeiro. situacao=ate_2_anos|pendentes|em_dia|vacina_atrasada|vacinas_em_dia|sem_vacina; pendencia=<código>; quem=Acs|Equipe.",
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pendencia",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quem",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfCriancaDoAcompanhamento"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/criancas/{id}/prontuario": {
      "get": {
        "tags": [
          "Pacientes · Crianças"
        ],
        "summary": "O prontuário da criança no e-SUS PEC (V0438): o mesmo da gestante (ao vivo, com a cópia guardada quando o PEC não responde).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "atualizar",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProntuarioDoPec"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/criancas/resumo": {
      "get": {
        "tags": [
          "Pacientes · Crianças"
        ],
        "summary": "O quadro das crianças: totais, até 2 anos, em dia, com vacina atrasada, microáreas com a ACS, pendências e a leitura.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResumoDasCriancas"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vacinas-dos-jovens": {
      "get": {
        "tags": [
          "Pacientes · Vacinas de 5 a 19 anos"
        ],
        "summary": "As crianças e adolescentes de 5 a 19 anos e as vacinas da INFÂNCIA que o e-SUS PEC registra (V0436): hepatite B, pólio, Penta/DTP e reforços, tríplice viral. HPV, meningo ACWY, febre amarela e dT o PEC não informa (nunca atrasadas). situacao=em_dia|atrasada|sem_registro|nao_sabemos; faixa=5_9|10_14|15_19; as atrasadas primeiro.",
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unidade",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "faixa",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfJovemDasVacinas"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vacinas-dos-jovens/resumo": {
      "get": {
        "tags": [
          "Pacientes · Vacinas de 5 a 19 anos"
        ],
        "summary": "O quadro das vacinas de 5 a 19 anos: total, em dia, atrasada, sem registro no PEC, não sabemos, microáreas e a leitura.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResumoDasVacinasDosJovens"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/idosos": {
      "get": {
        "tags": [
          "Pacientes · Pessoas idosas"
        ],
        "summary": "As pessoas idosas (60+) do acompanhamento do e-SUS PEC (V0420), com o que falta nos últimos 12 meses (consulta, 2 medidas de peso e altura, 2 visitas da ACS, vacina da gripe) e o IVCF-20. situacao=pendentes|em_dia|sem_ivcf|risco_alto; pendencia=<código>; quem=Acs|Equipe.",
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pendencia",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quem",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfIdosoDoAcompanhamento"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/idosos/resumo": {
      "get": {
        "tags": [
          "Pacientes · Pessoas idosas"
        ],
        "summary": "O quadro das pessoas idosas: totais, em dia, sem IVCF-20, risco alto, microáreas com a ACS, pendências e a leitura.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResumoDosIdosos"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mulheres": {
      "get": {
        "tags": [
          "Pacientes · Saúde da mulher"
        ],
        "summary": "As mulheres de 14 a 69 anos da saúde da mulher do e-SUS PEC (V0421), com o que falta pela idade (preventivo dos 25 aos 64 em 3 anos, mamografia dos 50 aos 69 em 2, vacina HPV até os 14, consulta no ano). situacao=pendentes|em_dia|preventivo|mamografia; pendencia=<código>; quem=Acs|Equipe.",
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pendencia",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quem",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfMulherDoAcompanhamento"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mulheres/resumo": {
      "get": {
        "tags": [
          "Pacientes · Saúde da mulher"
        ],
        "summary": "O quadro da saúde da mulher: totais, quantas na idade do preventivo e da mamografia e quantas em dia, microáreas e a leitura.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResumoDasMulheres"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/visitas-da-acs": {
      "get": {
        "tags": [
          "Pacientes · Visitas da ACS"
        ],
        "summary": "Quem a ACS precisa visitar e por quê: gestantes, puérperas, crianças, idosos, hipertensos e diabéticos juntos, uma linha por pessoa, com o endereço; entra a pendência da ACS e a urgente da equipe (a ACS leva o recado). As urgentes primeiro. lista=Gestante|Puérpera|Criança|Idoso|Hipertensão|Diabetes.",
        "parameters": [
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lista",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfVisitaDaAcs"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/visitas-da-acs/microareas": {
      "get": {
        "tags": [
          "Pacientes · Visitas da ACS"
        ],
        "summary": "Cada microárea com a ACS, quantas pessoas ela precisa visitar e quantas com urgência.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MicroareaDasVisitas"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/meu-roteiro": {
      "get": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "summary": "O roteiro do próximo dia de trabalho da ACS da sessão (a microárea da conta): o combinado pelo gestor, se houver; senão, a proposta de agora.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoteiroDaAcs"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/indicadores/{codigo}": {
      "get": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "summary": "A lista nominal de um indicador da qualidade (C2–C7): a nota (da unidade ou do município), cada prática com quantas pessoas cumprem, faltam, estão no prazo ou não sabemos, e as pessoas com um critério por prática (o porquê, quem resolve e até quando). Filtros: unidade, microárea, critério + situação (Falta, NoPrazo, NaoSabemos, Cumpre), quem.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unidade",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "criterio",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quem",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListaDoIndicador"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/indicadores/{codigo}/exportar": {
      "post": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "summary": "Exporta a lista nominal inteira do filtro em planilha (?formato=xlsx) ou PDF (?formato=pdf). Exige a justificativa (LGPD), que fica registrada com quem exportou, quando, o filtro e quantas pessoas; o arquivo diz em toda página quem exportou.",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "formato",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PedidoDeExportacaoNominal"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/producao": {
      "get": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "summary": "A produção do mês (relatórios gerenciais do PEC, V0444): por equipe (consultas médicas e de enfermagem e a média por dia útil, como no Informatiza), por profissional e as vacinas. Agregada, sem pessoa; ?mes=AAAA-MM, ?unidade=.",
        "parameters": [
          {
            "name": "mes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unidade",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProducaoDoMes"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/saude-do-municipio": {
      "get": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "summary": "O Início do gestor: a nota do município e de cada unidade nos indicadores de qualidade C2–C7 (estimativa pelas listas do PEC, com a tendência e quantas pessoas faltam para a próxima faixa), as 5 ações da semana (o quê, quem, onde, até quando, quantas pessoas), os alertas de dado com dono e prazo, o que mudou desde a leitura anterior e a data da leitura.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InicioDoGestor"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/o-que-fazer/quanto-vale": {
      "get": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "summary": "Quanto vale: as listas do PEC pelas regras do componente de qualidade da APS (Notas Metodológicas C1–C7, NT 8/2026), por unidade — a nota de cada indicador como faixa [mínima, máxima], a nota final estimada e o valor mensal da equipe em cada ponta.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuantoVale"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/o-que-fazer": {
      "get": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "summary": "O quadro de hoje: as pendências urgentes das listas (com quantas pessoas e quem resolve), as da equipe e as da ACS, e cada ACS com a carteira do mês, o ritmo (até ontem), a cota do próximo dia de trabalho e a última visita que chegou ao PEC.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OQueFazer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/o-que-fazer/roteiros/{microarea}": {
      "get": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "summary": "O roteiro do próximo dia de trabalho da ACS: o combinado, se houver; senão, a proposta de agora (urgentes, as que ficaram de um roteiro combinado, as com pendência da ACS e a carteira do mês), arrumado por bairro, rua e número.",
        "parameters": [
          {
            "name": "microarea",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoteiroDaAcs"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "summary": "Combina o roteiro (o gestor imprime para a ACS): calcula de novo e guarda; combinar outra vez substitui. É dele que sai o \"planejado × feito\" e a casa que ficou volta na frente.",
        "parameters": [
          {
            "name": "microarea",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoteiroDaAcs"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/o-que-fazer/recusas": {
      "get": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "summary": "As casas que recusaram a visita da ACS (desfecho do PEC, V0423) sem visita realizada depois: fora do roteiro, para a equipe decidir.",
        "parameters": [
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CasaQueRecusou"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/o-que-fazer/configuracao": {
      "put": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "summary": "Os dias úteis de folga no fim do mês (0 a 10; padrão 4) e o teto de casas por dia (5 a 60; padrão 20). Só o administrador e o gestor.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfiguracaoDoPlanoEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfiguracaoDoPlano"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/o-que-fazer/feriados": {
      "get": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "summary": "Os feriados dos anos (de, ate; até 3 anos): os nacionais calculados (Carnaval, Sexta-feira Santa e Corpus Christi pela Páscoa) e os do município.",
        "parameters": [
          {
            "name": "de",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "ate",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FeriadoDoCalendario"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "summary": "Cadastra um feriado municipal ou ponto facultativo (tipo=Municipal|PontoFacultativo). 409 feriado_repetido.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeriadoEnviado"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/o-que-fazer/feriados/{id}": {
      "delete": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/o-que-fazer/ausencias": {
      "get": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "summary": "As ausências das ACS (férias, atestado, folga) de hoje em diante e dos últimos 30 dias.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AusenciaDaAcsResumo"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "summary": "A ACS da microárea fora de um dia a outro (até 120 dias). motivo=Ferias|Atestado|Folga|Outro. O plano redistribui a carteira.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AusenciaEnviada"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/o-que-fazer/ausencias/{id}": {
      "delete": {
        "tags": [
          "Pacientes · O que fazer"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/domicilios": {
      "get": {
        "tags": [
          "Pacientes · Domicílios"
        ],
        "summary": "Os domicílios do cadastro territorial do e-SUS PEC. Busca por endereço, morador ou mãe (sem acento); só números, por CPF ou CNS.",
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "microarea",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inativos",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "pagina",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tamanho",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaOfDomicilioResumo"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/domicilios/microareas": {
      "get": {
        "tags": [
          "Pacientes · Domicílios"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MicroareaDoTerritorio"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/domicilios/leitura": {
      "get": {
        "tags": [
          "Pacientes · Domicílios"
        ],
        "summary": "A leitura dos domicílios do e-SUS PEC: de madrugada; a última rodada, a última boa, quantos domicílios e se há uma correndo agora.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeituraDosDomicilios"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Pacientes · Domicílios"
        ],
        "summary": "Lê os domicílios agora (leva minutos; a resposta volta logo, com emAndamento). Só o administrador global.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/domicilios/{id}": {
      "get": {
        "tags": [
          "Pacientes · Domicílios"
        ],
        "summary": "O domicílio, com os moradores (parentesco, nascimento, telefone).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomicilioDetalhe"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AcaoDaSemana": {
        "required": [
          "lista",
          "codigo",
          "indicador",
          "oQue",
          "quem",
          "onde",
          "ateQuando",
          "pessoas",
          "urgente"
        ],
        "type": "object",
        "properties": {
          "lista": {
            "type": "string"
          },
          "codigo": {
            "type": "string"
          },
          "indicador": {
            "type": "string"
          },
          "oQue": {
            "type": "string"
          },
          "quem": {
            "type": "string"
          },
          "onde": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LugarDaAcao"
            }
          },
          "ateQuando": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "urgente": {
            "type": "boolean"
          }
        }
      },
      "AcessoAoApp": {
        "required": [
          "token",
          "nomeDoApp"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "nomeDoApp": {
            "type": "string"
          }
        }
      },
      "AcsDoPlano": {
        "required": [
          "microarea",
          "agente",
          "carteira",
          "visitadasNoMes",
          "faltam",
          "esperado",
          "ritmo",
          "proximoDia",
          "cotaDoDia",
          "cotaNecessaria",
          "cabe",
          "urgentes",
          "ultimaVisitaRegistrada",
          "ausente",
          "ultimoRoteiro"
        ],
        "type": "object",
        "properties": {
          "microarea": {
            "type": "string"
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "carteira": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "visitadasNoMes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "faltam": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "esperado": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ritmo": {
            "type": "string"
          },
          "proximoDia": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "cotaDoDia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cotaNecessaria": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cabe": {
            "type": "boolean"
          },
          "urgentes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ultimaVisitaRegistrada": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "ausente": {
            "type": [
              "null",
              "string"
            ]
          },
          "ultimoRoteiro": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RoteiroAnterior"
              }
            ]
          },
          "recusas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          },
          "prioritarias": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          },
          "foraDoMes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          },
          "semListas": {
            "type": "boolean",
            "default": false
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgendaDoPec": {
        "required": [
          "ligada",
          "horarios",
          "ultimaEm",
          "ultimaDeuCerto",
          "falha",
          "atualizadaEm",
          "lidos",
          "semTelefone"
        ],
        "type": "object",
        "properties": {
          "ligada": {
            "type": "boolean"
          },
          "horarios": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ultimaEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "ultimaDeuCerto": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "falha": {
            "type": [
              "null",
              "string"
            ]
          },
          "atualizadaEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lidos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "semTelefone": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "AgendamentoDaAgenda": {
        "required": [
          "id",
          "pacienteId",
          "paciente",
          "telefone",
          "profissionalId",
          "profissional",
          "unidadeId",
          "unidade",
          "servicoId",
          "servico",
          "inicio",
          "fim",
          "situacao",
          "encaixe",
          "origem",
          "observacao",
          "motivoCancelamento",
          "situacaoDoWhatsApp",
          "erroDoWhatsApp",
          "avisadoEm",
          "resposta",
          "respondidoEm",
          "mensagem"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "paciente": {
            "type": "string"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "profissionalId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "profissional": {
            "type": "string"
          },
          "unidadeId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "unidade": {
            "type": "string"
          },
          "servicoId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "servico": {
            "type": [
              "null",
              "string"
            ]
          },
          "inicio": {
            "type": "string"
          },
          "fim": {
            "type": "string"
          },
          "situacao": {
            "type": "string"
          },
          "encaixe": {
            "type": "boolean"
          },
          "origem": {
            "type": "string"
          },
          "observacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "motivoCancelamento": {
            "type": [
              "null",
              "string"
            ]
          },
          "situacaoDoWhatsApp": {
            "type": [
              "null",
              "string"
            ]
          },
          "erroDoWhatsApp": {
            "type": [
              "null",
              "string"
            ]
          },
          "avisadoEm": {
            "type": [
              "null",
              "string"
            ]
          },
          "resposta": {
            "type": [
              "null",
              "string"
            ]
          },
          "respondidoEm": {
            "type": [
              "null",
              "string"
            ]
          },
          "mensagem": {
            "type": "string"
          },
          "telefoneContato": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefoneDoPaciente": {
            "type": [
              "null",
              "string"
            ]
          },
          "marcadoPor": {
            "type": [
              "null",
              "string"
            ]
          },
          "pec": {
            "type": [
              "null",
              "string"
            ]
          },
          "pediuContatoEm": {
            "type": [
              "null",
              "string"
            ]
          },
          "acs": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgendamentoEnviado": {
        "required": [
          "pacienteId",
          "profissionalId",
          "unidadeId",
          "servicoId",
          "inicio",
          "duracaoMinutos",
          "observacao",
          "espontaneo"
        ],
        "type": "object",
        "properties": {
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "profissionalId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "unidadeId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "servicoId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "inicio": {
            "type": [
              "null",
              "string"
            ]
          },
          "duracaoMinutos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "observacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "espontaneo": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "telefoneContato": {
            "type": [
              "null",
              "string"
            ]
          },
          "nomeDoPacienteNovo": {
            "type": [
              "null",
              "string"
            ]
          },
          "soAqui": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "AgendamentoNoPec": {
        "required": [
          "inicio",
          "situacao",
          "profissional",
          "ocupacao",
          "unidade"
        ],
        "type": "object",
        "properties": {
          "inicio": {
            "type": "string",
            "format": "date-time"
          },
          "situacao": {
            "type": "string"
          },
          "profissional": {
            "type": [
              "null",
              "string"
            ]
          },
          "ocupacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AlcanceDoRecado": {
        "required": [
          "pessoas"
        ],
        "type": "object",
        "properties": {
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "AlertaDeDado": {
        "required": [
          "codigo",
          "gravidade",
          "frase",
          "dono",
          "prazo",
          "pessoas",
          "lista",
          "onde"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "gravidade": {
            "type": "string"
          },
          "frase": {
            "type": "string"
          },
          "dono": {
            "type": "string"
          },
          "prazo": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lista": {
            "type": [
              "null",
              "string"
            ]
          },
          "onde": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AltaDeAuriculoEnviada": {
        "required": [
          "motivo",
          "nota"
        ],
        "type": "object",
        "properties": {
          "motivo": {
            "type": [
              "null",
              "string"
            ]
          },
          "nota": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AnonymousTypeOfboolean": {
        "required": [
          "podeVer"
        ],
        "type": "object",
        "properties": {
          "podeVer": {
            "type": "boolean"
          }
        }
      },
      "AparelhoDoPaciente": {
        "required": [
          "id",
          "aparelho",
          "criadoEm",
          "usadoEm"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "aparelho": {
            "type": [
              "null",
              "string"
            ]
          },
          "criadoEm": {
            "type": "string",
            "format": "date-time"
          },
          "usadoEm": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AppDoCidadaoPublico": {
        "required": [
          "slug",
          "nome",
          "municipio",
          "uf",
          "logoPrefeituraEm",
          "logoSaudeEm",
          "telefoneOficial",
          "mensagemDeEntrada"
        ],
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "municipio": {
            "type": "string"
          },
          "uf": {
            "type": "string"
          },
          "logoPrefeituraEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "logoSaudeEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "telefoneOficial": {
            "type": [
              "null",
              "string"
            ]
          },
          "mensagemDeEntrada": {
            "type": "string"
          },
          "paleta": {
            "type": "string",
            "default": "verde"
          },
          "sobre": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SobreDoApp"
              }
            ]
          },
          "brasaoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "AppDoPaciente": {
        "required": [
          "usaOApp",
          "aparelhos",
          "dependentes",
          "responsaveis"
        ],
        "type": "object",
        "properties": {
          "usaOApp": {
            "type": "boolean"
          },
          "aparelhos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AparelhoDoPaciente"
            }
          },
          "dependentes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VinculoNoPainel"
            }
          },
          "responsaveis": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VinculoNoPainel"
            }
          }
        }
      },
      "AreaDeAtendimento": {
        "required": [
          "codigo",
          "nome"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          }
        }
      },
      "AtendimentoNoPec": {
        "required": [
          "data",
          "tipo",
          "profissional",
          "ocupacao",
          "unidade",
          "semanasDeGestacao"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "string",
            "format": "date-time"
          },
          "tipo": {
            "type": [
              "null",
              "string"
            ]
          },
          "profissional": {
            "type": [
              "null",
              "string"
            ]
          },
          "ocupacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "semanasDeGestacao": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "AtualizacaoDoTelefone": {
        "required": [
          "celular",
          "semTelefone",
          "contatoTelefone",
          "contatoNome",
          "contatoParentesco",
          "casa"
        ],
        "type": "object",
        "properties": {
          "celular": {
            "type": [
              "null",
              "string"
            ]
          },
          "semTelefone": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "contatoTelefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "contatoNome": {
            "type": [
              "null",
              "string"
            ]
          },
          "contatoParentesco": {
            "type": [
              "null",
              "string"
            ]
          },
          "casa": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TelefoneDaCasaEnviado"
              }
            ]
          }
        }
      },
      "AusenciaDaAcsResumo": {
        "required": [
          "id",
          "microarea",
          "agente",
          "de",
          "ate",
          "motivo",
          "observacao",
          "criadoPor"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "microarea": {
            "type": "string"
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "de": {
            "type": "string",
            "format": "date"
          },
          "ate": {
            "type": "string",
            "format": "date"
          },
          "motivo": {
            "type": "string"
          },
          "observacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "criadoPor": {
            "type": "string"
          }
        }
      },
      "AusenciaEnviada": {
        "required": [
          "microarea",
          "de",
          "ate",
          "motivo",
          "observacao"
        ],
        "type": "object",
        "properties": {
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "de": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "ate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "motivo": {
            "type": [
              "null",
              "string"
            ]
          },
          "observacao": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AvisoAvulso": {
        "required": [
          "paciente",
          "telefone",
          "unidade",
          "texto"
        ],
        "type": "object",
        "properties": {
          "paciente": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "texto": {
            "type": [
              "null",
              "string"
            ]
          },
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "AvisoDaEscadaVisto": {
        "required": [
          "id",
          "pacienteId",
          "agendamentoId",
          "tipo",
          "canal",
          "para",
          "destinatario",
          "telefone",
          "sigiloso",
          "estado",
          "erro",
          "sms",
          "smsEm",
          "motivo",
          "por",
          "em"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "agendamentoId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "tipo": {
            "type": "string"
          },
          "canal": {
            "type": "string"
          },
          "para": {
            "type": "string"
          },
          "destinatario": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "sigiloso": {
            "type": "boolean"
          },
          "estado": {
            "type": "string"
          },
          "erro": {
            "type": [
              "null",
              "string"
            ]
          },
          "sms": {
            "type": [
              "null",
              "string"
            ]
          },
          "smsEm": {
            "type": [
              "null",
              "string"
            ]
          },
          "motivo": {
            "type": [
              "null",
              "string"
            ]
          },
          "por": {
            "type": "string"
          },
          "em": {
            "type": "string"
          }
        }
      },
      "AvisoDaImportacao": {
        "required": [
          "linha",
          "nome",
          "motivo"
        ],
        "type": "object",
        "properties": {
          "linha": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "motivo": {
            "type": "string"
          }
        }
      },
      "AvisoDaMarcacao": {
        "required": [
          "tipo",
          "situacao",
          "em",
          "desatualizado",
          "erro",
          "resposta"
        ],
        "type": "object",
        "properties": {
          "tipo": {
            "type": "string"
          },
          "situacao": {
            "type": "string"
          },
          "em": {
            "type": "string"
          },
          "desatualizado": {
            "type": "boolean"
          },
          "erro": {
            "type": [
              "null",
              "string"
            ]
          },
          "resposta": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AvisoNoApp": {
        "required": [
          "id",
          "tipo",
          "titulo",
          "texto",
          "para",
          "em",
          "lido",
          "botoes",
          "resposta"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "tipo": {
            "type": "string"
          },
          "titulo": {
            "type": "string"
          },
          "texto": {
            "type": "string"
          },
          "para": {
            "type": "string"
          },
          "em": {
            "type": "string",
            "format": "date-time"
          },
          "lido": {
            "type": "boolean"
          },
          "botoes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "resposta": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AvisosPedidos": {
        "required": [
          "saida",
          "destinatarios"
        ],
        "type": "object",
        "properties": {
          "saida": {
            "type": [
              "null",
              "string"
            ]
          },
          "destinatarios": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BloqueioDaAgenda": {
        "required": [
          "id",
          "profissionalId",
          "inicio",
          "fim",
          "motivo"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "profissionalId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "inicio": {
            "type": "string"
          },
          "fim": {
            "type": "string"
          },
          "motivo": {
            "type": "string"
          }
        }
      },
      "BloqueioEnviado": {
        "required": [
          "profissionalId",
          "inicio",
          "fim",
          "motivo"
        ],
        "type": "object",
        "properties": {
          "profissionalId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "inicio": {
            "type": [
              "null",
              "string"
            ]
          },
          "fim": {
            "type": [
              "null",
              "string"
            ]
          },
          "motivo": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CadastroNoPec": {
        "required": [
          "nomeMae",
          "nomePai",
          "microarea",
          "tipoSanguineo",
          "unidade",
          "equipe",
          "profissionalDaFamilia"
        ],
        "type": "object",
        "properties": {
          "nomeMae": {
            "type": [
              "null",
              "string"
            ]
          },
          "nomePai": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "tipoSanguineo": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "equipe": {
            "type": [
              "null",
              "string"
            ]
          },
          "profissionalDaFamilia": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CancelamentoEnviado": {
        "required": [
          "motivo"
        ],
        "type": "object",
        "properties": {
          "motivo": {
            "type": [
              "null",
              "string"
            ]
          },
          "soAqui": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "CartaoDeRemedios": {
        "required": [
          "pacienteId",
          "nome",
          "cpf",
          "cns",
          "dataNascimento",
          "usaOApp",
          "remedios"
        ],
        "type": "object",
        "properties": {
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "cpf": {
            "type": [
              "null",
              "string"
            ]
          },
          "cns": {
            "type": [
              "null",
              "string"
            ]
          },
          "dataNascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "usaOApp": {
            "type": "boolean"
          },
          "remedios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RemedioNoCartao"
            }
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefoneContato": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CasaDoPaciente": {
        "required": [
          "id",
          "endereco",
          "telefone",
          "de",
          "parentesco",
          "precisa"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "endereco": {
            "type": "string"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "de": {
            "type": [
              "null",
              "string"
            ]
          },
          "parentesco": {
            "type": [
              "null",
              "string"
            ]
          },
          "precisa": {
            "type": "boolean"
          }
        }
      },
      "CasaDoRoteiro": {
        "required": [
          "domicilioId",
          "posicao",
          "endereco",
          "bairro",
          "telefone",
          "moradores",
          "motivo",
          "ultimaVisita",
          "ficouDe",
          "ausenteEm",
          "pessoas"
        ],
        "type": "object",
        "properties": {
          "domicilioId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "posicao": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "endereco": {
            "type": "string"
          },
          "bairro": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "moradores": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "motivo": {
            "type": "string"
          },
          "ultimaVisita": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "ficouDe": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "ausenteEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "pessoas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PessoaDoRoteiro"
            }
          }
        }
      },
      "CasaQueRecusou": {
        "required": [
          "domicilioId",
          "microarea",
          "agente",
          "endereco",
          "bairro",
          "telefone",
          "recusouEm",
          "ultimaVisita",
          "pessoas"
        ],
        "type": "object",
        "properties": {
          "domicilioId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "microarea": {
            "type": "string"
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "endereco": {
            "type": "string"
          },
          "bairro": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "recusouEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "ultimaVisita": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "pessoas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CasaSemTelefone": {
        "required": [
          "id",
          "endereco",
          "bairro",
          "microarea",
          "equipe",
          "responsavel",
          "moradores",
          "telefoneDoPec",
          "motivo"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "endereco": {
            "type": "string"
          },
          "bairro": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "equipe": {
            "type": [
              "null",
              "string"
            ]
          },
          "responsavel": {
            "type": [
              "null",
              "string"
            ]
          },
          "moradores": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "telefoneDoPec": {
            "type": [
              "null",
              "string"
            ]
          },
          "motivo": {
            "type": "string"
          }
        }
      },
      "CatalogoDeAuriculo": {
        "required": [
          "pontos",
          "materiais",
          "contraindicacoes",
          "reacoes",
          "motivosDeAlta",
          "protocolos"
        ],
        "type": "object",
        "properties": {
          "pontos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PontoDoCatalogo"
            }
          },
          "materiais": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contraindicacoes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContraindicacaoDoCatalogo"
            }
          },
          "reacoes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "motivosDeAlta": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "protocolos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProtocoloDeAuriculoDaLista"
            }
          }
        }
      },
      "CidadeUsada": {
        "required": [
          "cidade",
          "locais"
        ],
        "type": "object",
        "properties": {
          "cidade": {
            "type": "string"
          },
          "locais": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ClinicoNoPec": {
        "required": [
          "atendimentos",
          "consultasDoPreNatal",
          "vacinas",
          "problemas",
          "remedios",
          "nascimento",
          "obstetricos"
        ],
        "type": "object",
        "properties": {
          "atendimentos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AtendimentoNoPec"
            }
          },
          "consultasDoPreNatal": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsultaDoPreNatalNoPec"
            }
          },
          "vacinas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VacinaNoPec"
            }
          },
          "problemas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemaNoPec"
            }
          },
          "remedios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RemedioNoPec"
            }
          },
          "nascimento": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/NascimentoNoPec"
              }
            ]
          },
          "obstetricos": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ObstetricosNoPec"
              }
            ]
          }
        }
      },
      "CodigoDoAppPedido": {
        "required": [
          "mensagem"
        ],
        "type": "object",
        "properties": {
          "mensagem": {
            "type": "string"
          }
        }
      },
      "CodigosDeRecuperacaoGerados": {
        "required": [
          "codigos"
        ],
        "type": "object",
        "properties": {
          "codigos": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ColetaResposta": {
        "required": [
          "id",
          "fonte",
          "parametros",
          "situacao",
          "criadaEm",
          "agendadaPara",
          "iniciadaEm",
          "concluidaEm",
          "tentativas",
          "lidos",
          "novos",
          "atualizados",
          "mensagem"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "fonte": {
            "type": "string"
          },
          "parametros": {
            "type": "string"
          },
          "situacao": {
            "type": "string"
          },
          "criadaEm": {
            "type": "string",
            "format": "date-time"
          },
          "agendadaPara": {
            "type": "string",
            "format": "date-time"
          },
          "iniciadaEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "concluidaEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "tentativas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lidos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "novos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "atualizados": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "mensagem": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ConclusaoEnviada": {
        "required": [
          "kmSaida",
          "kmRetorno",
          "retornoEm"
        ],
        "type": "object",
        "properties": {
          "kmSaida": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "kmRetorno": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "retornoEm": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ConfiguracaoDoAppDoCidadao": {
        "required": [
          "nome",
          "slug",
          "ativo",
          "atualizadoEm",
          "atualizadoPor"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "ativo": {
            "type": "boolean"
          },
          "atualizadoEm": {
            "type": "string",
            "format": "date-time"
          },
          "atualizadoPor": {
            "type": "string"
          },
          "paleta": {
            "type": "string",
            "default": "verde"
          },
          "sobre": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SobreDoApp"
              }
            ]
          }
        }
      },
      "ConfiguracaoDoAppEnviada": {
        "required": [
          "nome",
          "slug",
          "ativo"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "slug": {
            "type": [
              "null",
              "string"
            ]
          },
          "ativo": {
            "type": "boolean"
          },
          "paleta": {
            "type": [
              "null",
              "string"
            ]
          },
          "sobre": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SobreDoApp"
              }
            ]
          }
        }
      },
      "ConfiguracaoDoPlano": {
        "required": [
          "diasDeFolga",
          "tetoPorDia",
          "podeAlterar"
        ],
        "type": "object",
        "properties": {
          "diasDeFolga": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tetoPorDia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "podeAlterar": {
            "type": "boolean"
          },
          "mesesEntreVisitas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ConfiguracaoDoPlanoEnviada": {
        "required": [
          "diasDeFolga",
          "tetoPorDia"
        ],
        "type": "object",
        "properties": {
          "diasDeFolga": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tetoPorDia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "mesesEntreVisitas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ConfiguracaoDosAvisosEnviada": {
        "required": [
          "termosSigilosos"
        ],
        "type": "object",
        "properties": {
          "termosSigilosos": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ConfiguracaoDosAvisosVista": {
        "required": [
          "termosSigilosos",
          "deFabrica",
          "termosDeFabrica"
        ],
        "type": "object",
        "properties": {
          "termosSigilosos": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "deFabrica": {
            "type": "boolean"
          },
          "termosDeFabrica": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ConfiguracoesDoAniversario": {
        "required": [
          "mensagemBanner",
          "textoParabens",
          "modeloBanner",
          "atualizadoEm",
          "atualizadoPor",
          "podeAlterar"
        ],
        "type": "object",
        "properties": {
          "mensagemBanner": {
            "type": [
              "null",
              "string"
            ]
          },
          "textoParabens": {
            "type": [
              "null",
              "string"
            ]
          },
          "modeloBanner": {
            "type": [
              "null",
              "string"
            ]
          },
          "atualizadoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "atualizadoPor": {
            "type": [
              "null",
              "string"
            ]
          },
          "podeAlterar": {
            "type": "boolean"
          },
          "envioAutomatico": {
            "type": "boolean",
            "default": true
          },
          "modoDeTeste": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "ConfiguracoesDoAniversarioEnviadas": {
        "required": [
          "mensagemBanner",
          "textoParabens",
          "modeloBanner"
        ],
        "type": "object",
        "properties": {
          "mensagemBanner": {
            "type": [
              "null",
              "string"
            ]
          },
          "textoParabens": {
            "type": [
              "null",
              "string"
            ]
          },
          "modeloBanner": {
            "type": [
              "null",
              "string"
            ]
          },
          "envioAutomatico": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "ConfirmacaoEnviada": {
        "required": [
          "motoristaId",
          "saida"
        ],
        "type": "object",
        "properties": {
          "motoristaId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "saida": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ConsultaDoPreNatalNoPec": {
        "required": [
          "data",
          "profissional",
          "ocupacao",
          "pressaoArterial",
          "peso",
          "alturaUterina",
          "batimentoFetal",
          "edema",
          "movimentacaoFetal"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "string",
            "format": "date-time"
          },
          "profissional": {
            "type": [
              "null",
              "string"
            ]
          },
          "ocupacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "pressaoArterial": {
            "type": [
              "null",
              "string"
            ]
          },
          "peso": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "alturaUterina": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "batimentoFetal": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "edema": {
            "type": [
              "null",
              "string"
            ]
          },
          "movimentacaoFetal": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ConsultaMarcadaNoApp": {
        "required": [
          "consulta",
          "frase"
        ],
        "type": "object",
        "properties": {
          "consulta": {
            "$ref": "#/components/schemas/ConsultaNoApp"
          },
          "frase": {
            "type": "string"
          }
        }
      },
      "ConsultaNoApp": {
        "required": [
          "id",
          "paciente",
          "inicio",
          "unidade",
          "endereco",
          "profissional",
          "servico",
          "situacao",
          "podeResponder",
          "resposta"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "paciente": {
            "type": "string"
          },
          "inicio": {
            "type": "string",
            "format": "date-time"
          },
          "unidade": {
            "type": "string"
          },
          "endereco": {
            "type": [
              "null",
              "string"
            ]
          },
          "profissional": {
            "type": "string"
          },
          "servico": {
            "type": [
              "null",
              "string"
            ]
          },
          "situacao": {
            "type": "string"
          },
          "podeResponder": {
            "type": "boolean"
          },
          "resposta": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ContagemDePendencia": {
        "required": [
          "codigo",
          "rotulo",
          "quem",
          "quantas"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "rotulo": {
            "type": "string"
          },
          "quem": {
            "type": "string"
          },
          "quantas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ContagemDeTipo": {
        "required": [
          "tipo",
          "quantidade"
        ],
        "type": "object",
        "properties": {
          "tipo": {
            "type": "string"
          },
          "quantidade": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ContagemDoCadastro": {
        "required": [
          "ativos",
          "total"
        ],
        "type": "object",
        "properties": {
          "ativos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ContatoDaSaude": {
        "required": [
          "tipo",
          "nome",
          "detalhe",
          "telefone"
        ],
        "type": "object",
        "properties": {
          "tipo": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "detalhe": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ContatoDoPacienteDto": {
        "required": [
          "id",
          "nome",
          "relacao",
          "telefone",
          "contatoPacienteId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "relacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "contatoPacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "ContatoEnviado": {
        "required": [
          "nome",
          "relacao",
          "telefone"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "relacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "contatoPacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "ContatoInformado": {
        "required": [
          "telefone",
          "nome"
        ],
        "type": "object",
        "properties": {
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "principal": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ContraindicacaoDoCatalogo": {
        "required": [
          "codigo",
          "texto",
          "aviso"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "texto": {
            "type": "string"
          },
          "aviso": {
            "type": "string"
          }
        }
      },
      "CriancaDoAcompanhamento": {
        "required": [
          "id",
          "pacienteId",
          "nome",
          "nascimento",
          "meses",
          "telefone",
          "microarea",
          "agente",
          "unidade",
          "consultas",
          "consultasEsperadas",
          "medicoesPesoAltura",
          "primeiraConsulta",
          "primeiraVisita",
          "segundaVisita",
          "ultimaVisita",
          "vacinasAtrasadas",
          "pendencias",
          "noApp"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "nascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "meses": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "consultas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "consultasEsperadas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "medicoesPesoAltura": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "primeiraConsulta": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "primeiraVisita": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "segundaVisita": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "ultimaVisita": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "vacinasAtrasadas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "pendencias": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PendenciaDoAcompanhamento"
            }
          },
          "noApp": {
            "type": "boolean"
          },
          "semVacinaRegistrada": {
            "type": "boolean",
            "default": false
          },
          "nomeMae": {
            "type": [
              "null",
              "string"
            ]
          },
          "ultimoAtendimento": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UltimoAtendimentoDoPec"
              }
            ]
          }
        }
      },
      "CriterioDaPessoa": {
        "required": [
          "codigo",
          "titulo",
          "pontos",
          "situacao",
          "porque",
          "quem",
          "ateQuando",
          "venceEm"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "titulo": {
            "type": "string"
          },
          "pontos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "situacao": {
            "type": "string"
          },
          "porque": {
            "type": "string"
          },
          "quem": {
            "type": "string"
          },
          "ateQuando": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "venceEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "CronicoDoAcompanhamento": {
        "required": [
          "id",
          "pacienteId",
          "nome",
          "nascimento",
          "telefone",
          "microarea",
          "agente",
          "unidade",
          "condicao",
          "temAsDuas",
          "ultimaConsulta",
          "ultimaPressao",
          "ultimaPressaoEm",
          "pressaoAlta",
          "peso",
          "altura",
          "pesoAlturaEm",
          "visitasEm12Meses",
          "visitas36Meses",
          "ultimaVisita",
          "glicadaValor",
          "glicadaEm",
          "glicadaSolicitadaEm",
          "avaliacaoPesEm",
          "pendencias",
          "noApp"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "nascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "condicao": {
            "type": "string"
          },
          "temAsDuas": {
            "type": "boolean"
          },
          "ultimaConsulta": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "ultimaPressao": {
            "type": [
              "null",
              "string"
            ]
          },
          "ultimaPressaoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "pressaoAlta": {
            "type": "boolean"
          },
          "peso": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "altura": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "pesoAlturaEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "visitasEm12Meses": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "visitas36Meses": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ultimaVisita": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "glicadaValor": {
            "type": [
              "null",
              "string"
            ]
          },
          "glicadaEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "glicadaSolicitadaEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "avaliacaoPesEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "pendencias": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PendenciaDoAcompanhamento"
            }
          },
          "noApp": {
            "type": "boolean"
          }
        }
      },
      "CuidadoNoApp": {
        "required": [
          "tipo",
          "titulo",
          "destaque",
          "unidade",
          "lidoEm",
          "passos"
        ],
        "type": "object",
        "properties": {
          "tipo": {
            "type": "string"
          },
          "titulo": {
            "type": "string"
          },
          "destaque": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "lidoEm": {
            "type": "string",
            "format": "date-time"
          },
          "passos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PassoNoApp"
            }
          }
        }
      },
      "CuidadosDaPessoa": {
        "required": [
          "pacienteId",
          "nome",
          "cuidados"
        ],
        "type": "object",
        "properties": {
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "cuidados": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CuidadoNoApp"
            }
          }
        }
      },
      "CuidadosNoApp": {
        "required": [
          "pessoas"
        ],
        "type": "object",
        "properties": {
          "pessoas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CuidadosDaPessoa"
            }
          }
        }
      },
      "DependenteNoApp": {
        "required": [
          "id",
          "nome",
          "cns",
          "nascimento",
          "parentesco",
          "origem"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "cns": {
            "type": [
              "null",
              "string"
            ]
          },
          "nascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "parentesco": {
            "type": [
              "null",
              "string"
            ]
          },
          "origem": {
            "type": "string"
          }
        }
      },
      "DependentesNoApp": {
        "required": [
          "dependentes",
          "sugestoes"
        ],
        "type": "object",
        "properties": {
          "dependentes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DependenteNoApp"
            }
          },
          "sugestoes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SugestaoDeDependente"
            }
          }
        }
      },
      "DestinatarioDoAviso": {
        "required": [
          "chave",
          "papel",
          "nome",
          "telefone",
          "recadoCom",
          "tipo",
          "marcado",
          "ultimo",
          "texto",
          "peloApp"
        ],
        "type": "object",
        "properties": {
          "chave": {
            "type": "string"
          },
          "papel": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "recadoCom": {
            "type": [
              "null",
              "string"
            ]
          },
          "tipo": {
            "type": "string"
          },
          "marcado": {
            "type": "boolean"
          },
          "ultimo": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UltimoAviso"
              }
            ]
          },
          "texto": {
            "type": [
              "null",
              "string"
            ]
          },
          "peloApp": {
            "type": "boolean"
          }
        }
      },
      "DiaDeMarcacoes": {
        "required": [
          "data",
          "marcacoes",
          "pessoas",
          "semCarro"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "string",
            "format": "date"
          },
          "marcacoes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "semCarro": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "DiaDeViagens": {
        "required": [
          "data",
          "viagens",
          "pacientes",
          "motoristasLivres"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "string",
            "format": "date"
          },
          "viagens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pacientes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "motoristasLivres": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DiaDosTelefones": {
        "required": [
          "dia",
          "casas",
          "casasCom",
          "pacientes",
          "pacientesCom"
        ],
        "type": "object",
        "properties": {
          "dia": {
            "type": "string"
          },
          "casas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "casasCom": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pacientes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pacientesCom": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "DiaParaMarcar": {
        "required": [
          "dia",
          "manha",
          "tarde"
        ],
        "type": "object",
        "properties": {
          "dia": {
            "type": "string",
            "format": "date"
          },
          "manha": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tarde": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "DomicilioDetalhe": {
        "required": [
          "id",
          "endereco",
          "bairro",
          "cep",
          "microarea",
          "equipe",
          "unidade",
          "tipoImovel",
          "telefoneResidencial",
          "telefoneContato",
          "moradores",
          "lidoEm",
          "ativo"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "endereco": {
            "type": "string"
          },
          "bairro": {
            "type": [
              "null",
              "string"
            ]
          },
          "cep": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "equipe": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "tipoImovel": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefoneResidencial": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefoneContato": {
            "type": [
              "null",
              "string"
            ]
          },
          "moradores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MoradorDoDomicilio"
            }
          },
          "lidoEm": {
            "type": "string",
            "format": "date-time"
          },
          "ativo": {
            "type": "boolean"
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "agenteNome": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "DomicilioDoPaciente": {
        "required": [
          "domicilio"
        ],
        "type": "object",
        "properties": {
          "domicilio": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DomicilioDetalhe"
              }
            ]
          }
        }
      },
      "DomicilioResumo": {
        "required": [
          "id",
          "endereco",
          "bairro",
          "microarea",
          "responsavel",
          "moradores",
          "telefone",
          "ativo"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "endereco": {
            "type": "string"
          },
          "bairro": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "responsavel": {
            "type": [
              "null",
              "string"
            ]
          },
          "moradores": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "ativo": {
            "type": "boolean"
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "DosesDaVacina": {
        "required": [
          "imunobiologico",
          "doses",
          "porDose"
        ],
        "type": "object",
        "properties": {
          "imunobiologico": {
            "type": "string"
          },
          "doses": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "porDose": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContagemDeTipo"
            }
          }
        }
      },
      "EdicaoDoAgendamento": {
        "required": [
          "telefoneContato",
          "observacao"
        ],
        "type": "object",
        "properties": {
          "telefoneContato": {
            "type": [
              "null",
              "string"
            ]
          },
          "observacao": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "EntradaNoApp": {
        "required": [
          "celular",
          "codigo",
          "documento",
          "nascimento",
          "aparelho"
        ],
        "type": "object",
        "properties": {
          "celular": {
            "type": [
              "null",
              "string"
            ]
          },
          "codigo": {
            "type": [
              "null",
              "string"
            ]
          },
          "documento": {
            "type": [
              "null",
              "string"
            ]
          },
          "nascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "aparelho": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "EntradaPorCodigo": {
        "required": [
          "celular",
          "codigo",
          "painel"
        ],
        "type": "object",
        "properties": {
          "celular": {
            "type": [
              "null",
              "string"
            ]
          },
          "codigo": {
            "type": [
              "null",
              "string"
            ]
          },
          "painel": {
            "type": [
              "null",
              "string"
            ]
          },
          "modo": {
            "type": [
              "null",
              "string"
            ]
          },
          "cliente": {
            "type": [
              "null",
              "string"
            ]
          },
          "lembrar": {
            "type": "boolean",
            "default": false
          },
          "senha": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "EnvioDoAniversario": {
        "required": [
          "pacienteId",
          "situacao",
          "automatico",
          "por",
          "em",
          "deQuem",
          "motivo"
        ],
        "type": "object",
        "properties": {
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "situacao": {
            "type": "string"
          },
          "automatico": {
            "type": "boolean"
          },
          "por": {
            "type": "string"
          },
          "em": {
            "type": "string"
          },
          "deQuem": {
            "type": [
              "null",
              "string"
            ]
          },
          "motivo": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "EnvioDosParabens": {
        "required": [
          "periodo"
        ],
        "type": "object",
        "properties": {
          "periodo": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "EuNoApp": {
        "required": [
          "nomeDoApp",
          "municipio",
          "pessoas",
          "contatos"
        ],
        "type": "object",
        "properties": {
          "nomeDoApp": {
            "type": "string"
          },
          "municipio": {
            "type": "string"
          },
          "pessoas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PessoaNoApp"
            }
          },
          "contatos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContatoDaSaude"
            }
          },
          "eu": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MeusDados"
              }
            ]
          },
          "agente": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MinhaAgente"
              }
            ]
          }
        }
      },
      "ExpedienteEnviado": {
        "required": [
          "faixas"
        ],
        "type": "object",
        "properties": {
          "faixas": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/FaixaDeExpediente"
            }
          }
        }
      },
      "FaixaDeExpediente": {
        "required": [
          "unidadeId",
          "diaDaSemana",
          "inicio",
          "fim"
        ],
        "type": "object",
        "properties": {
          "unidadeId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "diaDaSemana": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "inicio": {
            "type": "string"
          },
          "fim": {
            "type": "string"
          }
        }
      },
      "FeriadoDoCalendario": {
        "required": [
          "id",
          "data",
          "nome",
          "tipo"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "data": {
            "type": "string",
            "format": "date"
          },
          "nome": {
            "type": "string"
          },
          "tipo": {
            "type": "string"
          }
        }
      },
      "FeriadoEnviado": {
        "required": [
          "data",
          "nome",
          "tipo"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "tipo": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "FichaDaCasa": {
        "required": [
          "codigo",
          "endereco",
          "bairro",
          "microarea",
          "equipe",
          "agente",
          "telefoneDaCasa",
          "de",
          "moradores"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "endereco": {
            "type": "string"
          },
          "bairro": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "equipe": {
            "type": [
              "null",
              "string"
            ]
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefoneDaCasa": {
            "type": [
              "null",
              "string"
            ]
          },
          "de": {
            "type": [
              "null",
              "string"
            ]
          },
          "moradores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MoradorDaFicha"
            }
          }
        }
      },
      "FichaDeAuriculo": {
        "required": [
          "pacienteId",
          "paciente",
          "idade",
          "telefone",
          "podeEditar",
          "aberto",
          "anteriores",
          "proxima"
        ],
        "type": "object",
        "properties": {
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "paciente": {
            "type": "string"
          },
          "idade": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "podeEditar": {
            "type": "boolean"
          },
          "aberto": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TratamentoDeAuriculoDaFicha"
              }
            ]
          },
          "anteriores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TratamentoDeAuriculoDaFicha"
            }
          },
          "proxima": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProximaSessaoDeAuriculo"
              }
            ]
          }
        }
      },
      "ForaDosParabens": {
        "required": [
          "nome",
          "motivo"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": "string"
          },
          "motivo": {
            "type": "string"
          }
        }
      },
      "FormularioDeOrgao": {
        "required": [
          "tipo",
          "nome",
          "municipioIbge",
          "cnpj",
          "cnpjFms"
        ],
        "type": "object",
        "properties": {
          "tipo": {
            "type": [
              "null",
              "string"
            ]
          },
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "municipioIbge": {
            "type": [
              "null",
              "string"
            ]
          },
          "cnpj": {
            "type": [
              "null",
              "string"
            ]
          },
          "cnpjFms": {
            "type": [
              "null",
              "string"
            ]
          },
          "tenant": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "cpf": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "FormularioDeUsuario": {
        "required": [
          "nome",
          "email",
          "papel",
          "senha"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "papel": {
            "type": [
              "null",
              "string"
            ]
          },
          "senha": {
            "type": [
              "null",
              "string"
            ]
          },
          "paineis": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "celular": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "FormularioDoPerfil": {
        "required": [
          "celular"
        ],
        "type": "object",
        "properties": {
          "celular": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GestacaoNoPec": {
        "required": [
          "inicio",
          "fim"
        ],
        "type": "object",
        "properties": {
          "inicio": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "fim": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "GestanteDoAcompanhamento": {
        "required": [
          "id",
          "pacienteId",
          "nome",
          "nascimento",
          "telefone",
          "microarea",
          "agente",
          "unidade",
          "puerpera",
          "semanas",
          "dpp",
          "altoRisco",
          "consultas",
          "consultasEsperadas",
          "consultasAte12Semanas",
          "consultasOdontologicas",
          "visitasAcs",
          "visitasEsperadas",
          "ultimaConsulta",
          "ultimaVisita",
          "vacinaDtpa",
          "pendencias"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "nascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "puerpera": {
            "type": "boolean"
          },
          "semanas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dpp": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "altoRisco": {
            "type": "boolean"
          },
          "consultas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "consultasEsperadas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "consultasAte12Semanas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "consultasOdontologicas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "visitasAcs": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "visitasEsperadas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ultimaConsulta": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "ultimaVisita": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "vacinaDtpa": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "pendencias": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PendenciaDoAcompanhamento"
            }
          },
          "noApp": {
            "type": "boolean",
            "default": false
          },
          "lembrete": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LembreteDaGestante"
              }
            ]
          },
          "podeLembrar": {
            "type": "boolean",
            "default": false
          },
          "nomeMae": {
            "type": [
              "null",
              "string"
            ]
          },
          "ultimoAtendimento": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UltimoAtendimentoDoPec"
              }
            ]
          }
        }
      },
      "GradeDaAgenda": {
        "required": [
          "de",
          "ate",
          "profissionais",
          "bloqueios",
          "agendamentos",
          "unidades",
          "servicos",
          "comunicacao"
        ],
        "type": "object",
        "properties": {
          "de": {
            "type": "string"
          },
          "ate": {
            "type": "string"
          },
          "profissionais": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfissionalNaGrade"
            }
          },
          "bloqueios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BloqueioDaAgenda"
            }
          },
          "agendamentos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgendamentoDaAgenda"
            }
          },
          "unidades": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnidadeDaAgenda"
            }
          },
          "servicos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServicoDaAgenda"
            }
          },
          "comunicacao": {
            "type": "boolean"
          }
        }
      },
      "HorarioDaCivi": {
        "required": [
          "rotulo",
          "pessoaId",
          "profissionalId",
          "dia",
          "horario"
        ],
        "type": "object",
        "properties": {
          "rotulo": {
            "type": "string"
          },
          "pessoaId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "profissionalId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "dia": {
            "type": "string",
            "format": "date"
          },
          "horario": {
            "type": "string"
          }
        }
      },
      "HorariosLivres": {
        "required": [
          "dia",
          "duracaoMinutos",
          "horarios"
        ],
        "type": "object",
        "properties": {
          "dia": {
            "type": "string"
          },
          "duracaoMinutos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "horarios": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "HorariosParaMarcar": {
        "required": [
          "dia",
          "turno",
          "horarios"
        ],
        "type": "object",
        "properties": {
          "dia": {
            "type": "string",
            "format": "date"
          },
          "turno": {
            "type": "string"
          },
          "horarios": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "IdosoDoAcompanhamento": {
        "required": [
          "id",
          "pacienteId",
          "nome",
          "nascimento",
          "telefone",
          "microarea",
          "agente",
          "unidade",
          "ultimaConsulta",
          "medicoesPesoAltura",
          "pesoAlturaEm",
          "visitasEm12Meses",
          "visitas36Meses",
          "ultimaVisita",
          "gripeEm",
          "ivcfRisco",
          "ivcfEm",
          "pendencias",
          "noApp"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "nascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "ultimaConsulta": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "medicoesPesoAltura": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pesoAlturaEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "visitasEm12Meses": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "visitas36Meses": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ultimaVisita": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "gripeEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "ivcfRisco": {
            "type": [
              "null",
              "string"
            ]
          },
          "ivcfEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "pendencias": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PendenciaDoAcompanhamento"
            }
          },
          "noApp": {
            "type": "boolean"
          }
        }
      },
      "IFormFile": {
        "type": "string",
        "format": "binary"
      },
      "ImportacaoDasFichas": {
        "required": [
          "linhas",
          "validas",
          "recusadas",
          "gravado",
          "itens"
        ],
        "type": "object",
        "properties": {
          "linhas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "validas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "recusadas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "gravado": {
            "type": "boolean"
          },
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinhaDaFicha"
            }
          }
        }
      },
      "ImportacaoDePacientesEnviada": {
        "required": [
          "linhas"
        ],
        "type": "object",
        "properties": {
          "linhas": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PessoaImportada"
            }
          }
        }
      },
      "ImportacaoNaAgenda": {
        "required": [
          "arquivo",
          "linhas",
          "criadas",
          "jaExistiam",
          "pacientesNovos",
          "recusadas",
          "avisos"
        ],
        "type": "object",
        "properties": {
          "arquivo": {
            "type": "string"
          },
          "linhas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "criadas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "jaExistiam": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pacientesNovos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "recusadas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinhaDaAgendaRecusada"
            }
          },
          "avisos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinhaDaAgendaRecusada"
            }
          }
        }
      },
      "IndicadorDeQualidade": {
        "required": [
          "codigo",
          "nome",
          "peso",
          "pessoas",
          "notaMinima",
          "notaMaxima",
          "faixaMinima",
          "faixaMaxima",
          "proxima",
          "sobeNaNotaFinal",
          "praticas"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "peso": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "notaMinima": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "notaMaxima": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "faixaMinima": {
            "type": [
              "null",
              "string"
            ]
          },
          "faixaMaxima": {
            "type": [
              "null",
              "string"
            ]
          },
          "proxima": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProximaFaixa"
              }
            ]
          },
          "sobeNaNotaFinal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "praticas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PraticaDeQualidade"
            }
          }
        }
      },
      "IndicadorDoInicio": {
        "required": [
          "codigo",
          "nome",
          "pessoas",
          "notaMinima",
          "notaMaxima",
          "faixaMinima",
          "faixaMaxima",
          "tendencia",
          "proxima"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "notaMinima": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "notaMaxima": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "faixaMinima": {
            "type": [
              "null",
              "string"
            ]
          },
          "faixaMaxima": {
            "type": [
              "null",
              "string"
            ]
          },
          "tendencia": {
            "type": [
              "null",
              "string"
            ]
          },
          "proxima": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProximaFaixaEmPessoas"
              }
            ]
          }
        }
      },
      "InicioDoGestor": {
        "required": [
          "hoje",
          "municipio",
          "lidoEm",
          "listasComFalha",
          "quadrimestreDe",
          "quadrimestreAte",
          "diasParaFechar",
          "doMunicipio",
          "unidades",
          "unidadesSemLeitura",
          "acoes",
          "alertas",
          "mudou",
          "valoresPorEquipe",
          "avisos"
        ],
        "type": "object",
        "properties": {
          "hoje": {
            "type": "string",
            "format": "date"
          },
          "municipio": {
            "type": [
              "null",
              "string"
            ]
          },
          "lidoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "listasComFalha": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "quadrimestreDe": {
            "type": "string",
            "format": "date"
          },
          "quadrimestreAte": {
            "type": "string",
            "format": "date"
          },
          "diasParaFechar": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "doMunicipio": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/NotaDoLugar"
              }
            ]
          },
          "unidades": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotaDoLugar"
            }
          },
          "unidadesSemLeitura": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "acoes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AcaoDaSemana"
            }
          },
          "alertas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertaDeDado"
            }
          },
          "mudou": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MudancaDesdeALeitura"
              }
            ]
          },
          "valoresPorEquipe": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValorDaFaixa"
            }
          },
          "avisos": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "InscricaoDePush": {
        "required": [
          "endpoint",
          "p256dh",
          "auth"
        ],
        "type": "object",
        "properties": {
          "endpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "p256dh": {
            "type": [
              "null",
              "string"
            ]
          },
          "auth": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ItemDoHistoricoDaAgenda": {
        "required": [
          "em",
          "quem",
          "acao",
          "detalhe"
        ],
        "type": "object",
        "properties": {
          "em": {
            "type": "string"
          },
          "quem": {
            "type": "string"
          },
          "acao": {
            "type": "string"
          },
          "detalhe": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ItemDoQuadro": {
        "required": [
          "lista",
          "codigo",
          "rotulo",
          "quem",
          "urgente",
          "pessoas"
        ],
        "type": "object",
        "properties": {
          "lista": {
            "type": "string"
          },
          "codigo": {
            "type": "string"
          },
          "rotulo": {
            "type": "string"
          },
          "quem": {
            "type": "string"
          },
          "urgente": {
            "type": "boolean"
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "JanelaDeAvisos": {
        "required": [
          "viagemId",
          "situacao",
          "saida",
          "destinatarios"
        ],
        "type": "object",
        "properties": {
          "viagemId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "situacao": {
            "type": "string"
          },
          "saida": {
            "type": "string"
          },
          "destinatarios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DestinatarioDoAviso"
            }
          }
        }
      },
      "JovemDasVacinas": {
        "required": [
          "id",
          "pacienteId",
          "nome",
          "nascimento",
          "anos",
          "telefone",
          "microarea",
          "agente",
          "unidade",
          "situacao",
          "atrasadas",
          "doses",
          "noApp"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "nascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "anos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "situacao": {
            "type": "string"
          },
          "atrasadas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "doses": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "noApp": {
            "type": "boolean"
          }
        }
      },
      "LeituraDoAcompanhamento": {
        "required": [
          "ultimaEm",
          "ultimaDeuCerto",
          "falha",
          "atualizadaEm"
        ],
        "type": "object",
        "properties": {
          "ultimaEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "ultimaDeuCerto": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "falha": {
            "type": [
              "null",
              "string"
            ]
          },
          "atualizadaEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "LeituraDosDomicilios": {
        "required": [
          "ligada",
          "horario",
          "ultimaEm",
          "ultimaDeuCerto",
          "falha",
          "atualizadaEm",
          "domicilios",
          "emAndamento"
        ],
        "type": "object",
        "properties": {
          "ligada": {
            "type": "boolean"
          },
          "horario": {
            "type": [
              "null",
              "string"
            ]
          },
          "ultimaEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "ultimaDeuCerto": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "falha": {
            "type": [
              "null",
              "string"
            ]
          },
          "atualizadaEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "domicilios": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "emAndamento": {
            "type": "boolean"
          }
        }
      },
      "LembreteDaGestante": {
        "required": [
          "enviadoEm",
          "lido",
          "resposta",
          "proximo"
        ],
        "type": "object",
        "properties": {
          "enviadoEm": {
            "type": "string",
            "format": "date-time"
          },
          "lido": {
            "type": "boolean"
          },
          "resposta": {
            "type": [
              "null",
              "string"
            ]
          },
          "proximo": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "LembretesDoPreNatal": {
        "required": [
          "gestantes",
          "notificados"
        ],
        "type": "object",
        "properties": {
          "gestantes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "notificados": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "LinhaDaAgendaRecusada": {
        "required": [
          "linha",
          "motivo"
        ],
        "type": "object",
        "properties": {
          "linha": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "motivo": {
            "type": "string"
          }
        }
      },
      "LinhaDaFicha": {
        "required": [
          "linha",
          "codigo",
          "quem",
          "situacao",
          "mensagem"
        ],
        "type": "object",
        "properties": {
          "linha": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "codigo": {
            "type": "string"
          },
          "quem": {
            "type": [
              "null",
              "string"
            ]
          },
          "situacao": {
            "type": "string"
          },
          "mensagem": {
            "type": "string"
          }
        }
      },
      "ListaDoIndicador": {
        "required": [
          "codigo",
          "nome",
          "hoje",
          "de",
          "ate",
          "lidoEm",
          "unidade",
          "pessoas",
          "notaMinima",
          "notaMaxima",
          "faixaMinima",
          "faixaMaxima",
          "proxima",
          "praticas",
          "unidades",
          "microareas",
          "lista",
          "avisos"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "hoje": {
            "type": "string",
            "format": "date"
          },
          "de": {
            "type": "string",
            "format": "date"
          },
          "ate": {
            "type": "string",
            "format": "date"
          },
          "lidoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "notaMinima": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "notaMaxima": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "faixaMinima": {
            "type": [
              "null",
              "string"
            ]
          },
          "faixaMaxima": {
            "type": [
              "null",
              "string"
            ]
          },
          "proxima": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProximaFaixaEmPessoas"
              }
            ]
          },
          "praticas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PraticaDoIndicador"
            }
          },
          "unidades": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "microareas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MicroareaDoIndicador"
            }
          },
          "lista": {
            "$ref": "#/components/schemas/PaginaOfPessoaDoIndicador"
          },
          "avisos": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "LugarDaAcao": {
        "required": [
          "microarea",
          "agente",
          "unidade",
          "pessoas"
        ],
        "type": "object",
        "properties": {
          "microarea": {
            "type": "string"
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "Marcacao": {
        "required": [
          "id",
          "paciente",
          "pacienteId",
          "telefone",
          "telefoneContato",
          "contatoNome",
          "destinoCidade",
          "destinoLocal",
          "data",
          "horaNoDestino",
          "temAcompanhante",
          "acompanhante",
          "descricao",
          "observacao",
          "situacao",
          "motivoCancelamento",
          "viagemId",
          "saida",
          "veiculo",
          "placa",
          "motorista",
          "foraDoPrazo",
          "aviso",
          "soNaVolta"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "paciente": {
            "type": "string"
          },
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefoneContato": {
            "type": [
              "null",
              "string"
            ]
          },
          "contatoNome": {
            "type": [
              "null",
              "string"
            ]
          },
          "destinoCidade": {
            "type": "string"
          },
          "destinoLocal": {
            "type": [
              "null",
              "string"
            ]
          },
          "data": {
            "type": "string",
            "format": "date"
          },
          "horaNoDestino": {
            "type": "string"
          },
          "temAcompanhante": {
            "type": "boolean"
          },
          "acompanhante": {
            "type": [
              "null",
              "string"
            ]
          },
          "descricao": {
            "type": [
              "null",
              "string"
            ]
          },
          "observacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "situacao": {
            "type": "string"
          },
          "motivoCancelamento": {
            "type": [
              "null",
              "string"
            ]
          },
          "viagemId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "saida": {
            "type": [
              "null",
              "string"
            ]
          },
          "veiculo": {
            "type": [
              "null",
              "string"
            ]
          },
          "placa": {
            "type": [
              "null",
              "string"
            ]
          },
          "motorista": {
            "type": [
              "null",
              "string"
            ]
          },
          "foraDoPrazo": {
            "type": "boolean"
          },
          "aviso": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AvisoDaMarcacao"
              }
            ]
          },
          "soNaVolta": {
            "type": "boolean"
          }
        }
      },
      "MarcacaoEnviada": {
        "required": [
          "paciente",
          "pacienteId",
          "telefone",
          "telefoneContato",
          "contatoNome",
          "destinoCidade",
          "destinoLocal",
          "data",
          "horaNoDestino",
          "temAcompanhante",
          "acompanhante",
          "descricao",
          "observacao"
        ],
        "type": "object",
        "properties": {
          "paciente": {
            "type": [
              "null",
              "string"
            ]
          },
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefoneContato": {
            "type": [
              "null",
              "string"
            ]
          },
          "contatoNome": {
            "type": [
              "null",
              "string"
            ]
          },
          "destinoCidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "destinoLocal": {
            "type": [
              "null",
              "string"
            ]
          },
          "data": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "horaNoDestino": {
            "type": [
              "null",
              "string"
            ]
          },
          "temAcompanhante": {
            "type": "boolean"
          },
          "acompanhante": {
            "type": [
              "null",
              "string"
            ]
          },
          "descricao": {
            "type": [
              "null",
              "string"
            ]
          },
          "observacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "soNaVolta": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "MarcacaoNoApp": {
        "required": [
          "pessoaId",
          "profissionalId",
          "dia",
          "horario"
        ],
        "type": "object",
        "properties": {
          "pessoaId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "profissionalId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "dia": {
            "type": "string",
            "format": "date"
          },
          "horario": {
            "type": "string"
          }
        }
      },
      "MarcacaoPeloApp": {
        "required": [
          "aceita",
          "vagasManha",
          "vagasTarde",
          "antecedenciaDias",
          "janelaDias",
          "funcao",
          "temExpediente"
        ],
        "type": "object",
        "properties": {
          "aceita": {
            "type": "boolean"
          },
          "vagasManha": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "vagasTarde": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "antecedenciaDias": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "janelaDias": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "funcao": {
            "type": [
              "null",
              "string"
            ]
          },
          "temExpediente": {
            "type": "boolean"
          }
        }
      },
      "MarcacaoPeloAppEnviada": {
        "required": [
          "aceita",
          "vagasManha",
          "vagasTarde",
          "antecedenciaDias",
          "janelaDias"
        ],
        "type": "object",
        "properties": {
          "aceita": {
            "type": "boolean"
          },
          "vagasManha": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "vagasTarde": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "antecedenciaDias": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "janelaDias": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "MensagemDaCaixa": {
        "required": [
          "id",
          "destino",
          "destinatario",
          "texto",
          "origem",
          "situacao",
          "tentativas",
          "erro",
          "criadaEm",
          "enviadaEm",
          "entregueEm",
          "lidaEm"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "destino": {
            "type": "string"
          },
          "destinatario": {
            "type": [
              "null",
              "string"
            ]
          },
          "texto": {
            "type": "string"
          },
          "origem": {
            "type": "string"
          },
          "situacao": {
            "type": "string"
          },
          "tentativas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "erro": {
            "type": [
              "null",
              "string"
            ]
          },
          "criadaEm": {
            "type": "string"
          },
          "enviadaEm": {
            "type": [
              "null",
              "string"
            ]
          },
          "entregueEm": {
            "type": [
              "null",
              "string"
            ]
          },
          "lidaEm": {
            "type": [
              "null",
              "string"
            ]
          },
          "smsDeReserva": {
            "type": [
              "null",
              "string"
            ]
          },
          "smsEm": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MensagemDaCivi": {
        "required": [
          "papel",
          "texto"
        ],
        "type": "object",
        "properties": {
          "papel": {
            "type": [
              "null",
              "string"
            ]
          },
          "texto": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MensagemNoApp": {
        "required": [
          "id",
          "texto",
          "em",
          "de"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "texto": {
            "type": "string"
          },
          "em": {
            "type": "string",
            "format": "date-time"
          },
          "de": {
            "type": "string"
          }
        }
      },
      "MeusDados": {
        "required": [
          "nome",
          "cns",
          "nascimento",
          "telefone",
          "telefoneContato",
          "contatoNome"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": "string"
          },
          "cns": {
            "type": [
              "null",
              "string"
            ]
          },
          "nascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefoneContato": {
            "type": [
              "null",
              "string"
            ]
          },
          "contatoNome": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MicroareaDasGestantes": {
        "required": [
          "codigo",
          "agente",
          "gestantes",
          "comUrgencia"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "gestantes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "comUrgencia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "MicroareaDasVacinas": {
        "required": [
          "codigo",
          "agente",
          "pessoas",
          "emDia",
          "atrasada"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "emDia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "atrasada": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "MicroareaDasVisitas": {
        "required": [
          "codigo",
          "agente",
          "pessoas",
          "urgentes"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "urgentes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "MicroareaDoAcompanhamento": {
        "required": [
          "codigo",
          "agente",
          "pessoas",
          "emDia",
          "comUrgencia",
          "precisamDeVisita"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "emDia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "comUrgencia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "precisamDeVisita": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "MicroareaDoIndicador": {
        "required": [
          "codigo",
          "agente",
          "pessoas",
          "comFalta"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "comFalta": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "MicroareaDoTerritorio": {
        "required": [
          "codigo",
          "agente"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MinhaAgente": {
        "required": [
          "nome",
          "microarea",
          "equipe",
          "unidade"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": "string"
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "equipe": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ModeloDeAviso": {
        "required": [
          "chave",
          "nome",
          "texto",
          "padrao"
        ],
        "type": "object",
        "properties": {
          "chave": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "texto": {
            "type": "string"
          },
          "padrao": {
            "type": "boolean"
          }
        }
      },
      "ModeloEnviado": {
        "required": [
          "nome",
          "texto"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "texto": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ModuloDoCatalogo": {
        "required": [
          "codigo",
          "nome",
          "resumo",
          "telas"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "resumo": {
            "type": "string"
          },
          "telas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ModuloDoOrgao": {
        "required": [
          "codigo",
          "nome",
          "resumo",
          "telas",
          "contratado",
          "contratadoEm"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "resumo": {
            "type": "string"
          },
          "telas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contratado": {
            "type": "boolean"
          },
          "contratadoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ModuloDoPainel": {
        "required": [
          "codigo",
          "nome",
          "resumo",
          "noMenu"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "resumo": {
            "type": "string"
          },
          "noMenu": {
            "type": "boolean"
          }
        }
      },
      "MoradorDaFicha": {
        "required": [
          "codigo",
          "nome",
          "idade",
          "parentesco",
          "celular",
          "responsavel"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "idade": {
            "type": [
              "null",
              "string"
            ]
          },
          "parentesco": {
            "type": [
              "null",
              "string"
            ]
          },
          "celular": {
            "type": [
              "null",
              "string"
            ]
          },
          "responsavel": {
            "type": "boolean"
          }
        }
      },
      "MoradorDoDomicilio": {
        "required": [
          "pacienteId",
          "nome",
          "parentesco",
          "responsavel",
          "dataNascimento",
          "telefone",
          "nomeMae",
          "faleceu"
        ],
        "type": "object",
        "properties": {
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "parentesco": {
            "type": [
              "null",
              "string"
            ]
          },
          "responsavel": {
            "type": "boolean"
          },
          "dataNascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "nomeMae": {
            "type": [
              "null",
              "string"
            ]
          },
          "faleceu": {
            "type": "boolean"
          }
        }
      },
      "MotivoDaVisita": {
        "required": [
          "lista",
          "frase",
          "tipo",
          "urgente"
        ],
        "type": "object",
        "properties": {
          "lista": {
            "type": "string"
          },
          "frase": {
            "type": "string"
          },
          "tipo": {
            "type": "string"
          },
          "urgente": {
            "type": "boolean"
          },
          "prazo": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "MotoristaDaFrota": {
        "required": [
          "id",
          "nome",
          "telefone",
          "cnhCategoria",
          "cnhValidade",
          "diasParaVencer",
          "ativo"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "cnhCategoria": {
            "type": [
              "null",
              "string"
            ]
          },
          "cnhValidade": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "diasParaVencer": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ativo": {
            "type": "boolean"
          }
        }
      },
      "MotoristaEnviado": {
        "required": [
          "nome",
          "telefone",
          "cnhCategoria",
          "cnhValidade"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "cnhCategoria": {
            "type": [
              "null",
              "string"
            ]
          },
          "cnhValidade": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "MotoristaParaViagem": {
        "required": [
          "id",
          "nome",
          "jaVaiPara",
          "viagensNoMes",
          "impedimento"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "jaVaiPara": {
            "type": [
              "null",
              "string"
            ]
          },
          "viagensNoMes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "impedimento": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MovimentoEnviado": {
        "required": [
          "viagemId"
        ],
        "type": "object",
        "properties": {
          "viagemId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "MudancaDesdeALeitura": {
        "required": [
          "desde",
          "indicadores"
        ],
        "type": "object",
        "properties": {
          "desde": {
            "type": "string",
            "format": "date"
          },
          "indicadores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MudancaDoIndicador"
            }
          }
        }
      },
      "MudancaDoIndicador": {
        "required": [
          "codigo",
          "nome",
          "entraram",
          "sairam",
          "cumpriram"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "entraram": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "sairam": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cumpriram": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "MulherDoAcompanhamento": {
        "required": [
          "id",
          "pacienteId",
          "nome",
          "nascimento",
          "idade",
          "telefone",
          "microarea",
          "agente",
          "unidade",
          "ultimaConsulta",
          "preventivoEm",
          "preventivoPedidoEm",
          "mamografiaEm",
          "mamografiaPedidaEm",
          "hpvDoses",
          "pendencias",
          "noApp"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "nascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "idade": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "ultimaConsulta": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "preventivoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "preventivoPedidoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "mamografiaEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "mamografiaPedidaEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "hpvDoses": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pendencias": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PendenciaDoAcompanhamento"
            }
          },
          "noApp": {
            "type": "boolean"
          }
        }
      },
      "MunicipioResposta": {
        "required": [
          "ibge",
          "nome",
          "uf",
          "ufNome",
          "microrregiao",
          "mesorregiao",
          "regiaoImediata",
          "regiaoIntermediaria",
          "monitorado"
        ],
        "type": "object",
        "properties": {
          "ibge": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nome": {
            "type": "string"
          },
          "uf": {
            "type": "string"
          },
          "ufNome": {
            "type": "string"
          },
          "microrregiao": {
            "type": [
              "null",
              "string"
            ]
          },
          "mesorregiao": {
            "type": [
              "null",
              "string"
            ]
          },
          "regiaoImediata": {
            "type": [
              "null",
              "string"
            ]
          },
          "regiaoIntermediaria": {
            "type": [
              "null",
              "string"
            ]
          },
          "monitorado": {
            "type": "boolean"
          }
        }
      },
      "NascimentoNoPec": {
        "required": [
          "peso",
          "altura",
          "perimetroCefalico",
          "apgar1",
          "apgar5",
          "idadeGestacionalSemanas",
          "tipoParto",
          "tipoGravidez"
        ],
        "type": "object",
        "properties": {
          "peso": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "altura": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "perimetroCefalico": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "apgar1": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "apgar5": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "idadeGestacionalSemanas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tipoParto": {
            "type": [
              "null",
              "string"
            ]
          },
          "tipoGravidez": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "NotaDoLugar": {
        "required": [
          "nome",
          "notaMinima",
          "notaMaxima",
          "faixaMinima",
          "faixaMaxima",
          "tendencia",
          "indicadores"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": "string"
          },
          "notaMinima": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "notaMaxima": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "faixaMinima": {
            "type": "string"
          },
          "faixaMaxima": {
            "type": "string"
          },
          "tendencia": {
            "type": [
              "null",
              "string"
            ]
          },
          "indicadores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IndicadorDoInicio"
            }
          }
        }
      },
      "ObstetricosNoPec": {
        "required": [
          "gestacoes",
          "partos",
          "abortos",
          "cesareas",
          "nascidosVivos",
          "filhosVivos",
          "ultimoParto"
        ],
        "type": "object",
        "properties": {
          "gestacoes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "partos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "abortos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cesareas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nascidosVivos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "filhosVivos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ultimoParto": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "OpcoesDeMarcacao": {
        "required": [
          "pessoas"
        ],
        "type": "object",
        "properties": {
          "pessoas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PessoaParaMarcar"
            }
          }
        }
      },
      "OQueFazer": {
        "required": [
          "hoje",
          "lidoEm",
          "prioridades",
          "daEquipe",
          "daAcs",
          "agentes",
          "configuracao"
        ],
        "type": "object",
        "properties": {
          "hoje": {
            "type": "string",
            "format": "date"
          },
          "lidoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "prioridades": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemDoQuadro"
            }
          },
          "daEquipe": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemDoQuadro"
            }
          },
          "daAcs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemDoQuadro"
            }
          },
          "agentes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AcsDoPlano"
            }
          },
          "configuracao": {
            "$ref": "#/components/schemas/ConfiguracaoDoPlano"
          }
        }
      },
      "OrgaoDetalhe": {
        "required": [
          "codigo",
          "nome",
          "tipo",
          "municipioIbge",
          "municipio",
          "uf",
          "cnpj",
          "cnpjFms",
          "ativo",
          "criadoEm",
          "brasaoAtualizadoEm"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string",
            "format": "uuid"
          },
          "nome": {
            "type": "string"
          },
          "tipo": {
            "type": "string"
          },
          "municipioIbge": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "municipio": {
            "type": "string"
          },
          "uf": {
            "type": "string"
          },
          "cnpj": {
            "type": [
              "null",
              "string"
            ]
          },
          "cnpjFms": {
            "type": [
              "null",
              "string"
            ]
          },
          "ativo": {
            "type": "boolean"
          },
          "criadoEm": {
            "type": "string",
            "format": "date-time"
          },
          "brasaoAtualizadoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "tenant": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TenantResumo"
              }
            ]
          },
          "cpf": {
            "type": [
              "null",
              "string"
            ]
          },
          "logoPrefeituraAtualizadoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "logoSaudeAtualizadoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "OrgaoResumo": {
        "required": [
          "codigo",
          "nome",
          "tipo",
          "municipioIbge",
          "municipio",
          "uf",
          "ativo",
          "brasaoAtualizadoEm",
          "modulos"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string",
            "format": "uuid"
          },
          "nome": {
            "type": "string"
          },
          "tipo": {
            "type": "string"
          },
          "municipioIbge": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "municipio": {
            "type": "string"
          },
          "uf": {
            "type": "string"
          },
          "ativo": {
            "type": "boolean"
          },
          "brasaoAtualizadoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "modulos": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tenant": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TenantResumo"
              }
            ]
          },
          "logoPrefeituraAtualizadoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "logoSaudeAtualizadoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "subdominio": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PacienteConhecido": {
        "required": [
          "paciente",
          "telefone",
          "unidade"
        ],
        "type": "object",
        "properties": {
          "paciente": {
            "type": "string"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PacienteDoCadastro": {
        "required": [
          "id",
          "nome",
          "dataNascimento",
          "cpf",
          "cns",
          "nomeMae",
          "telefone",
          "telefoneContato",
          "contatoNome",
          "ativo"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "dataNascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "cpf": {
            "type": [
              "null",
              "string"
            ]
          },
          "cns": {
            "type": [
              "null",
              "string"
            ]
          },
          "nomeMae": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefoneContato": {
            "type": [
              "null",
              "string"
            ]
          },
          "contatoNome": {
            "type": [
              "null",
              "string"
            ]
          },
          "ativo": {
            "type": "boolean"
          },
          "domicilioId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "parentesco": {
            "type": [
              "null",
              "string"
            ]
          },
          "faleceu": {
            "type": "boolean",
            "default": false
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "appUsadoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "PacienteEnviado": {
        "required": [
          "nome",
          "dataNascimento",
          "cpf",
          "cns",
          "nomeMae",
          "telefone",
          "telefoneContato",
          "contatoNome"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "dataNascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "cpf": {
            "type": [
              "null",
              "string"
            ]
          },
          "cns": {
            "type": [
              "null",
              "string"
            ]
          },
          "nomeMae": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefoneContato": {
            "type": [
              "null",
              "string"
            ]
          },
          "contatoNome": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PaginaOfCasaSemTelefone": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CasaSemTelefone"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfColetaResposta": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ColetaResposta"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfCriancaDoAcompanhamento": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CriancaDoAcompanhamento"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfCronicoDoAcompanhamento": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CronicoDoAcompanhamento"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfDomicilioResumo": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DomicilioResumo"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfGestanteDoAcompanhamento": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GestanteDoAcompanhamento"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfIdosoDoAcompanhamento": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IdosoDoAcompanhamento"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfJovemDasVacinas": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JovemDasVacinas"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfMarcacao": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Marcacao"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfMensagemDaCaixa": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MensagemDaCaixa"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfMotoristaDaFrota": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MotoristaDaFrota"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfMulherDoAcompanhamento": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MulherDoAcompanhamento"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfMunicipioResposta": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MunicipioResposta"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfOrgaoResumo": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrgaoResumo"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfPacienteDoCadastro": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PacienteDoCadastro"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfPessoaDoIndicador": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PessoaDoIndicador"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfProfissionalDaAgenda": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfissionalDaAgenda"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfRecadoDoApp": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecadoDoApp"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfRenovacaoNaFila": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RenovacaoNaFila"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfUsuarioResumo": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UsuarioResumo"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfVeiculoDaFrota": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VeiculoDaFrota"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfViagemDaFrota": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ViagemDaFrota"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PaginaOfVisitaDaAcs": {
        "required": [
          "itens",
          "total",
          "numero",
          "tamanho"
        ],
        "type": "object",
        "properties": {
          "itens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VisitaDaAcs"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tamanho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PainelAtribuivel": {
        "required": [
          "codigo",
          "nome"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          }
        }
      },
      "PainelCliente": {
        "required": [
          "codigo",
          "nome",
          "modulos",
          "atualizadoEm"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "modulos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModuloDoPainel"
            }
          },
          "atualizadoEm": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PainelDosTelefones": {
        "required": [
          "casas",
          "casasCom",
          "pacientes",
          "pacientesComCelular",
          "porEquipe",
          "porMicroarea",
          "evolucao",
          "equipe",
          "microarea",
          "podeVerCasas",
          "podeGerir",
          "podeInformarCasa"
        ],
        "type": "object",
        "properties": {
          "casas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "casasCom": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pacientes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pacientesComCelular": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "porEquipe": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecorteDosTelefones"
            }
          },
          "porMicroarea": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecorteDosTelefones"
            }
          },
          "evolucao": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiaDosTelefones"
            }
          },
          "equipe": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "podeVerCasas": {
            "type": "boolean"
          },
          "podeGerir": {
            "type": "boolean"
          },
          "podeInformarCasa": {
            "type": "boolean"
          }
        }
      },
      "PapelAtribuivel": {
        "required": [
          "valor",
          "rotulo",
          "descricao",
          "pertenceAOrgao"
        ],
        "type": "object",
        "properties": {
          "valor": {
            "type": "string"
          },
          "rotulo": {
            "type": "string"
          },
          "descricao": {
            "type": "string"
          },
          "pertenceAOrgao": {
            "type": "boolean"
          }
        }
      },
      "PassageiroDaViagem": {
        "required": [
          "nome",
          "acompanhante",
          "motivo",
          "pedidoId",
          "consulta",
          "local",
          "telefone",
          "telefoneContato",
          "contatoNome",
          "soNaVolta"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": "string"
          },
          "acompanhante": {
            "type": "boolean"
          },
          "motivo": {
            "type": [
              "null",
              "string"
            ]
          },
          "pedidoId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "consulta": {
            "type": [
              "null",
              "string"
            ]
          },
          "local": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefoneContato": {
            "type": [
              "null",
              "string"
            ]
          },
          "contatoNome": {
            "type": [
              "null",
              "string"
            ]
          },
          "soNaVolta": {
            "type": "boolean"
          }
        }
      },
      "PassageiroEnviado": {
        "required": [
          "nome",
          "acompanhante",
          "motivo",
          "pedidoId"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "acompanhante": {
            "type": "boolean"
          },
          "motivo": {
            "type": [
              "null",
              "string"
            ]
          },
          "pedidoId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "soNaVolta": {
            "type": "boolean",
            "default": false
          },
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "consulta": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PassagemEnviada": {
        "required": [
          "situacao"
        ],
        "type": "object",
        "properties": {
          "situacao": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PassoNoApp": {
        "required": [
          "codigo",
          "titulo",
          "situacao",
          "detalhe",
          "feitas",
          "meta",
          "quem"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "titulo": {
            "type": "string"
          },
          "situacao": {
            "type": "string"
          },
          "detalhe": {
            "type": [
              "null",
              "string"
            ]
          },
          "feitas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "meta": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "quem": {
            "type": "string"
          }
        }
      },
      "PedidoACivi": {
        "required": [
          "conversa",
          "mensagens"
        ],
        "type": "object",
        "properties": {
          "conversa": {
            "type": "string",
            "format": "uuid"
          },
          "mensagens": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/MensagemDaCivi"
            }
          }
        }
      },
      "PedidoDeCodigo": {
        "required": [
          "codigo"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PedidoDeCodigoDeEntrada": {
        "required": [
          "celular",
          "painel"
        ],
        "type": "object",
        "properties": {
          "celular": {
            "type": [
              "null",
              "string"
            ]
          },
          "painel": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PedidoDeCodigoDoApp": {
        "required": [
          "celular"
        ],
        "type": "object",
        "properties": {
          "celular": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PedidoDeConfirmacao": {
        "required": [
          "agendamentos"
        ],
        "type": "object",
        "properties": {
          "agendamentos": {
            "type": "array",
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          }
        }
      },
      "PedidoDeContaDoProfissional": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "celular": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PedidoDeEntrada": {
        "required": [
          "email",
          "senha",
          "modo",
          "cliente"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "senha": {
            "type": [
              "null",
              "string"
            ]
          },
          "modo": {
            "type": [
              "null",
              "string"
            ]
          },
          "cliente": {
            "type": [
              "null",
              "string"
            ]
          },
          "painel": {
            "type": [
              "null",
              "string"
            ]
          },
          "subdominio": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PedidoDeExportacaoNominal": {
        "required": [
          "justificativa",
          "unidade",
          "microarea",
          "criterio",
          "situacao",
          "quem",
          "busca"
        ],
        "type": "object",
        "properties": {
          "justificativa": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "criterio": {
            "type": [
              "null",
              "string"
            ]
          },
          "situacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "quem": {
            "type": [
              "null",
              "string"
            ]
          },
          "busca": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PedidoDeLembretes": {
        "required": [
          "microarea"
        ],
        "type": "object",
        "properties": {
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PedidoDeMenuDoPainel": {
        "required": [
          "modulos"
        ],
        "type": "object",
        "properties": {
          "modulos": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PedidoDeModulos": {
        "required": [
          "modulos"
        ],
        "type": "object",
        "properties": {
          "modulos": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PedidoDeParabens": {
        "required": [
          "pacientes"
        ],
        "type": "object",
        "properties": {
          "pacientes": {
            "type": "array",
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          "texto": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PedidoDePosicaoDaCapa": {
        "required": [
          "posicaoY"
        ],
        "type": "object",
        "properties": {
          "posicaoY": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PedidoDeRecuperacaoDeSenha": {
        "required": [
          "email",
          "painel"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "painel": {
            "type": [
              "null",
              "string"
            ]
          },
          "celular": {
            "type": [
              "null",
              "string"
            ]
          },
          "canal": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PedidoDeRedefinicaoDeSenha": {
        "required": [
          "token",
          "senhaNova"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": [
              "null",
              "string"
            ]
          },
          "senhaNova": {
            "type": [
              "null",
              "string"
            ]
          },
          "celular": {
            "type": [
              "null",
              "string"
            ]
          },
          "codigo": {
            "type": [
              "null",
              "string"
            ]
          },
          "painel": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PedidoDeSegundoFator": {
        "required": [
          "codigo"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PedidoDeSenha": {
        "required": [
          "senha"
        ],
        "type": "object",
        "properties": {
          "senha": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PedidoDeSituacao": {
        "required": [
          "ativo"
        ],
        "type": "object",
        "properties": {
          "ativo": {
            "type": "boolean"
          }
        }
      },
      "PedidoDeTrocaDeOrgao": {
        "required": [
          "codigo"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "PedidoDeTrocaDeSenha": {
        "required": [
          "senhaAtual",
          "senhaNova"
        ],
        "type": "object",
        "properties": {
          "senhaAtual": {
            "type": [
              "null",
              "string"
            ]
          },
          "senhaNova": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PedidoDeUnidadesDaConta": {
        "required": [
          "unidades"
        ],
        "type": "object",
        "properties": {
          "unidades": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          }
        }
      },
      "PendenciaDoAcompanhamento": {
        "required": [
          "codigo",
          "frase",
          "quem",
          "urgente"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "frase": {
            "type": "string"
          },
          "quem": {
            "type": "string"
          },
          "urgente": {
            "type": "boolean"
          }
        }
      },
      "PerfilDaConta": {
        "required": [
          "codigo",
          "nome",
          "email",
          "celular"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string",
            "format": "uuid"
          },
          "nome": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "celular": {
            "type": [
              "null",
              "string"
            ]
          },
          "foto": {
            "type": [
              "null",
              "string"
            ]
          },
          "capa": {
            "type": [
              "null",
              "string"
            ]
          },
          "capaPosicaoY": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PessoaDoIndicador": {
        "required": [
          "pacienteId",
          "nome",
          "nascimento",
          "unidade",
          "microarea",
          "agente",
          "pontos",
          "pontosPossiveis",
          "criterios"
        ],
        "type": "object",
        "properties": {
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "nascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "pontos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pontosPossiveis": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "criterios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CriterioDaPessoa"
            }
          }
        }
      },
      "PessoaDoRoteiro": {
        "required": [
          "pacienteId",
          "nome",
          "nascimento",
          "telefone",
          "motivos"
        ],
        "type": "object",
        "properties": {
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "nascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "motivos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MotivoDaVisita"
            }
          }
        }
      },
      "PessoaImportada": {
        "required": [
          "linha",
          "nome",
          "dataNascimento",
          "cpf",
          "cns",
          "nomeMae"
        ],
        "type": "object",
        "properties": {
          "linha": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "dataNascimento": {
            "type": [
              "null",
              "string"
            ]
          },
          "cpf": {
            "type": [
              "null",
              "string"
            ]
          },
          "cns": {
            "type": [
              "null",
              "string"
            ]
          },
          "nomeMae": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PessoaNoApp": {
        "required": [
          "id",
          "nome",
          "primeiroNome"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "primeiroNome": {
            "type": "string"
          }
        }
      },
      "PessoaParaMarcar": {
        "required": [
          "id",
          "nome",
          "primeiroNome",
          "unidade",
          "profissionais",
          "motivo"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "primeiroNome": {
            "type": "string"
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "profissionais": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfissionalParaMarcar"
            }
          },
          "motivo": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PontoDeAuriculo": {
        "required": [
          "ponto",
          "livre",
          "material"
        ],
        "type": "object",
        "properties": {
          "ponto": {
            "type": [
              "null",
              "string"
            ]
          },
          "livre": {
            "type": [
              "null",
              "string"
            ]
          },
          "material": {
            "type": "string"
          }
        }
      },
      "PontoDoCatalogo": {
        "required": [
          "codigo",
          "nome",
          "para"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "para": {
            "type": "string"
          }
        }
      },
      "PraticaDeQualidade": {
        "required": [
          "codigo",
          "descricao",
          "pontos",
          "pessoas",
          "cumprem",
          "naoCumprem",
          "naoSabemos",
          "ganhoPorPessoa"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "descricao": {
            "type": "string"
          },
          "pontos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cumprem": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "naoCumprem": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "naoSabemos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ganhoPorPessoa": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "PraticaDoIndicador": {
        "required": [
          "codigo",
          "titulo",
          "pontos",
          "quem",
          "pessoas",
          "cumprem",
          "faltam",
          "noPrazo",
          "naoSabemos"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string"
          },
          "titulo": {
            "type": "string"
          },
          "pontos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "quem": {
            "type": "string"
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cumprem": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "faltam": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "noPrazo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "naoSabemos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PreNatalNoPec": {
        "required": [
          "dum",
          "altoRisco",
          "tipoDeGravidez",
          "planejada",
          "fonteIdadeGestacional"
        ],
        "type": "object",
        "properties": {
          "dum": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "altoRisco": {
            "type": "boolean"
          },
          "tipoDeGravidez": {
            "type": [
              "null",
              "string"
            ]
          },
          "planejada": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "fonteIdadeGestacional": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PreviaDosParabens": {
        "required": [
          "dia",
          "enviar",
          "nomes",
          "fora",
          "modoDeTeste"
        ],
        "type": "object",
        "properties": {
          "dia": {
            "type": "string"
          },
          "enviar": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nomes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fora": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ForaDosParabens"
            }
          },
          "modoDeTeste": {
            "type": "boolean"
          }
        }
      },
      "ProblemaNoPec": {
        "required": [
          "descricao",
          "codigo",
          "situacao",
          "desde"
        ],
        "type": "object",
        "properties": {
          "descricao": {
            "type": "string"
          },
          "codigo": {
            "type": [
              "null",
              "string"
            ]
          },
          "situacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "desde": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "ProducaoDaEquipe": {
        "required": [
          "equipe",
          "unidade",
          "medicas",
          "enfermagem",
          "odontologicas",
          "outras",
          "medicasPorDiaUtil",
          "enfermagemPorDiaUtil"
        ],
        "type": "object",
        "properties": {
          "equipe": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": "string"
          },
          "medicas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "enfermagem": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "odontologicas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "outras": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "medicasPorDiaUtil": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "enfermagemPorDiaUtil": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "metaMedicas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "metaEnfermagem": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "faltamMedicas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "faltamEnfermagem": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ProducaoDoMes": {
        "required": [
          "mes",
          "meses",
          "lidoEm",
          "unidade",
          "unidades",
          "diasUteis",
          "diasUteisAteHoje",
          "equipes",
          "profissionais",
          "vacinas",
          "avisos"
        ],
        "type": "object",
        "properties": {
          "mes": {
            "type": "string",
            "format": "date"
          },
          "meses": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date"
            }
          },
          "lidoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidades": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "diasUteis": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "diasUteisAteHoje": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "equipes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProducaoDaEquipe"
            }
          },
          "profissionais": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProducaoDoProfissional"
            }
          },
          "vacinas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DosesDaVacina"
            }
          },
          "avisos": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "referencia": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProducaoDoProfissional": {
        "required": [
          "nome",
          "cbo",
          "categoria",
          "equipe",
          "unidade",
          "total",
          "porTipo"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "cbo": {
            "type": [
              "null",
              "string"
            ]
          },
          "categoria": {
            "type": "string"
          },
          "equipe": {
            "type": [
              "null",
              "string"
            ]
          },
          "unidade": {
            "type": "string"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "porTipo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContagemDeTipo"
            }
          }
        }
      },
      "ProfissionalDaAgenda": {
        "required": [
          "id",
          "nome",
          "telefone",
          "areas",
          "especialidade",
          "conselho",
          "registro",
          "corAgenda",
          "ativo",
          "temLogin",
          "foto"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "areas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "especialidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "conselho": {
            "type": [
              "null",
              "string"
            ]
          },
          "registro": {
            "type": [
              "null",
              "string"
            ]
          },
          "corAgenda": {
            "type": [
              "null",
              "string"
            ]
          },
          "ativo": {
            "type": "boolean"
          },
          "temLogin": {
            "type": "boolean"
          },
          "foto": {
            "type": [
              "null",
              "string"
            ]
          },
          "app": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MarcacaoPeloApp"
              }
            ]
          }
        }
      },
      "ProfissionalEnviado": {
        "required": [
          "nome",
          "telefone",
          "areas",
          "especialidade",
          "conselho",
          "registro",
          "corAgenda"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "areas": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "especialidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "conselho": {
            "type": [
              "null",
              "string"
            ]
          },
          "registro": {
            "type": [
              "null",
              "string"
            ]
          },
          "corAgenda": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProfissionalNaGrade": {
        "required": [
          "id",
          "nome",
          "especialidade",
          "areas",
          "cor",
          "faixas",
          "foto"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "especialidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "areas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cor": {
            "type": [
              "null",
              "string"
            ]
          },
          "faixas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FaixaDeExpediente"
            }
          },
          "foto": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProfissionalParaMarcar": {
        "required": [
          "id",
          "nome",
          "funcao"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "funcao": {
            "type": "string"
          },
          "jaMarcada": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ProntuarioDoPec": {
        "required": [
          "lidoEm",
          "aoVivo",
          "falha",
          "cadastro",
          "preNatal",
          "gestacoes",
          "agendamentos",
          "ultimoAtendimento",
          "clinico"
        ],
        "type": "object",
        "properties": {
          "lidoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "aoVivo": {
            "type": "boolean"
          },
          "falha": {
            "type": [
              "null",
              "string"
            ]
          },
          "cadastro": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CadastroNoPec"
              }
            ]
          },
          "preNatal": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PreNatalNoPec"
              }
            ]
          },
          "gestacoes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GestacaoNoPec"
            }
          },
          "agendamentos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgendamentoNoPec"
            }
          },
          "ultimoAtendimento": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UltimoAtendimentoDoPec"
              }
            ]
          },
          "clinico": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ClinicoNoPec"
              }
            ]
          }
        }
      },
      "ProtocoloDeAuriculoDaLista": {
        "required": [
          "id",
          "nome",
          "descricao",
          "pontos"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "descricao": {
            "type": [
              "null",
              "string"
            ]
          },
          "pontos": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ProtocoloDeAuriculoEnviado": {
        "required": [
          "nome",
          "descricao",
          "pontos"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "descricao": {
            "type": [
              "null",
              "string"
            ]
          },
          "pontos": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ProximaFaixa": {
        "required": [
          "faixa",
          "faltamPontos"
        ],
        "type": "object",
        "properties": {
          "faixa": {
            "type": "string"
          },
          "faltamPontos": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ProximaFaixaEmPessoas": {
        "required": [
          "faixa",
          "pessoas",
          "comecePor"
        ],
        "type": "object",
        "properties": {
          "faixa": {
            "type": "string"
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "comecePor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProximaSessaoDeAuriculo": {
        "required": [
          "numero",
          "de",
          "orelha",
          "agendamentoId",
          "agendamentoEm"
        ],
        "type": "object",
        "properties": {
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "de": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "orelha": {
            "type": "string"
          },
          "agendamentoId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "agendamentoEm": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "QualidadeDaUnidade": {
        "required": [
          "unidade",
          "notaMinima",
          "notaMaxima",
          "faixaMinima",
          "faixaMaxima",
          "valorMensalMinimo",
          "valorMensalMaximo",
          "indicadores"
        ],
        "type": "object",
        "properties": {
          "unidade": {
            "type": "string"
          },
          "notaMinima": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "notaMaxima": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "faixaMinima": {
            "type": "string"
          },
          "faixaMaxima": {
            "type": "string"
          },
          "valorMensalMinimo": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "valorMensalMaximo": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "indicadores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IndicadorDeQualidade"
            }
          }
        }
      },
      "QuantoVale": {
        "required": [
          "hoje",
          "quadrimestreDe",
          "quadrimestreAte",
          "regras",
          "valoresPorEquipe",
          "unidades",
          "avisos"
        ],
        "type": "object",
        "properties": {
          "hoje": {
            "type": "string",
            "format": "date"
          },
          "quadrimestreDe": {
            "type": "string",
            "format": "date"
          },
          "quadrimestreAte": {
            "type": "string",
            "format": "date"
          },
          "regras": {
            "type": "string"
          },
          "valoresPorEquipe": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValorDaFaixa"
            }
          },
          "unidades": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QualidadeDaUnidade"
            }
          },
          "avisos": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RecadoDoApp": {
        "required": [
          "id",
          "tipo",
          "titulo",
          "texto",
          "publico",
          "microarea",
          "idadeMinima",
          "idadeMaxima",
          "enviadoPor",
          "enviadoEm",
          "pessoas",
          "notificados",
          "lidos",
          "responderam"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "tipo": {
            "type": "string"
          },
          "titulo": {
            "type": "string"
          },
          "texto": {
            "type": "string"
          },
          "publico": {
            "type": "string"
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "idadeMinima": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "idadeMaxima": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "enviadoPor": {
            "type": "string"
          },
          "enviadoEm": {
            "type": "string",
            "format": "date-time"
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "notificados": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lidos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "responderam": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "RecadoEnviado": {
        "required": [
          "tipo",
          "titulo",
          "texto",
          "publico",
          "microarea",
          "idadeMinima",
          "idadeMaxima"
        ],
        "type": "object",
        "properties": {
          "tipo": {
            "type": [
              "null",
              "string"
            ]
          },
          "titulo": {
            "type": [
              "null",
              "string"
            ]
          },
          "texto": {
            "type": [
              "null",
              "string"
            ]
          },
          "publico": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "idadeMinima": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "idadeMaxima": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "RecorteDosTelefones": {
        "required": [
          "nome",
          "casas",
          "casasCom",
          "pacientes",
          "pacientesComCelular"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": "string"
          },
          "casas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "casasCom": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pacientes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pacientesComCelular": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "RemarcacaoEnviada": {
        "required": [
          "profissionalId",
          "unidadeId",
          "inicio",
          "duracaoMinutos"
        ],
        "type": "object",
        "properties": {
          "profissionalId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "unidadeId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "inicio": {
            "type": [
              "null",
              "string"
            ]
          },
          "duracaoMinutos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "RemedioEnviado": {
        "required": [
          "nome",
          "comoTomar",
          "quantidade",
          "diasEntreRetiradas",
          "receitaAte",
          "observacao"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "comoTomar": {
            "type": [
              "null",
              "string"
            ]
          },
          "quantidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "diasEntreRetiradas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "receitaAte": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "observacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "noApp": {
            "type": "boolean",
            "default": true
          },
          "ativo": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "RemedioNoApp": {
        "required": [
          "id",
          "nome",
          "comoTomar",
          "quantidade",
          "ultimaRetirada",
          "proximaRetirada",
          "receitaAte",
          "retiradas"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "comoTomar": {
            "type": [
              "null",
              "string"
            ]
          },
          "quantidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "ultimaRetirada": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "proximaRetirada": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "receitaAte": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "retiradas": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date"
            }
          },
          "podePedirRenovacao": {
            "type": "boolean",
            "default": false
          },
          "renovacao": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RenovacaoNoApp"
              }
            ]
          }
        }
      },
      "RemedioNoCartao": {
        "required": [
          "id",
          "nome",
          "comoTomar",
          "quantidade",
          "diasEntreRetiradas",
          "receitaAte",
          "observacao",
          "noApp",
          "ativo",
          "ultimaRetirada",
          "proximaRetirada",
          "retiradas"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "comoTomar": {
            "type": [
              "null",
              "string"
            ]
          },
          "quantidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "diasEntreRetiradas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "receitaAte": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "observacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "noApp": {
            "type": "boolean"
          },
          "ativo": {
            "type": "boolean"
          },
          "ultimaRetirada": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "proximaRetirada": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "retiradas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RetiradaNoCartao"
            }
          }
        }
      },
      "RemedioNoPec": {
        "required": [
          "nome",
          "posologia",
          "inicio",
          "fim",
          "usoContinuo"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": "string"
          },
          "posologia": {
            "type": [
              "null",
              "string"
            ]
          },
          "inicio": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "fim": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "usoContinuo": {
            "type": "boolean"
          }
        }
      },
      "RemediosDaPessoa": {
        "required": [
          "pacienteId",
          "nome",
          "remedios"
        ],
        "type": "object",
        "properties": {
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "remedios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RemedioNoApp"
            }
          }
        }
      },
      "RemediosNoApp": {
        "required": [
          "pessoas"
        ],
        "type": "object",
        "properties": {
          "pessoas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RemediosDaPessoa"
            }
          }
        }
      },
      "RenovacaoDaCivi": {
        "required": [
          "rotulo",
          "remedioId"
        ],
        "type": "object",
        "properties": {
          "rotulo": {
            "type": "string"
          },
          "remedioId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "RenovacaoNaFila": {
        "required": [
          "id",
          "pacienteId",
          "paciente",
          "telefone",
          "remedioId",
          "remedio",
          "receitaAte",
          "pedidaEm",
          "situacao",
          "receitaAteNova",
          "resposta",
          "respondidaEm",
          "respondidaPor"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "paciente": {
            "type": "string"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "remedioId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "remedio": {
            "type": "string"
          },
          "receitaAte": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "pedidaEm": {
            "type": "string",
            "format": "date-time"
          },
          "situacao": {
            "type": "string"
          },
          "receitaAteNova": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "resposta": {
            "type": [
              "null",
              "string"
            ]
          },
          "respondidaEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "respondidaPor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RenovacaoNoApp": {
        "required": [
          "situacao",
          "pedidaEm",
          "receitaAteNova",
          "resposta"
        ],
        "type": "object",
        "properties": {
          "situacao": {
            "type": "string"
          },
          "pedidaEm": {
            "type": "string",
            "format": "date-time"
          },
          "receitaAteNova": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "resposta": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RespostaAoAviso": {
        "required": [
          "opcao"
        ],
        "type": "object",
        "properties": {
          "opcao": {
            "type": "string"
          }
        }
      },
      "RespostaARenovacao": {
        "required": [
          "decisao",
          "receitaAte",
          "resposta"
        ],
        "type": "object",
        "properties": {
          "decisao": {
            "type": [
              "null",
              "string"
            ]
          },
          "receitaAte": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "resposta": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RespostaASugestao": {
        "required": [
          "aceitar",
          "parentesco"
        ],
        "type": "object",
        "properties": {
          "aceitar": {
            "type": "boolean"
          },
          "parentesco": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RespostaDaCivi": {
        "required": [
          "texto",
          "horarios",
          "renovacoes",
          "soBotoes"
        ],
        "type": "object",
        "properties": {
          "texto": {
            "type": "string"
          },
          "horarios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HorarioDaCivi"
            }
          },
          "renovacoes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RenovacaoDaCivi"
            }
          },
          "soBotoes": {
            "type": "boolean"
          },
          "marcada": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ConsultaMarcadaNoApp"
              }
            ]
          }
        }
      },
      "RespostaNoApp": {
        "required": [
          "vou"
        ],
        "type": "object",
        "properties": {
          "vou": {
            "type": "boolean"
          }
        }
      },
      "ResultadoDaImportacao": {
        "required": [
          "recebidos",
          "criados",
          "atualizados",
          "ignorados",
          "avisos"
        ],
        "type": "object",
        "properties": {
          "recebidos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "criados": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "atualizados": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ignorados": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "avisos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvisoDaImportacao"
            }
          }
        }
      },
      "ResultadoDoAviso": {
        "required": [
          "enviadas",
          "recusas"
        ],
        "type": "object",
        "properties": {
          "enviadas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "recusas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ResultadoDosAvisos": {
        "required": [
          "enfileirados",
          "semTelefone",
          "viagem"
        ],
        "type": "object",
        "properties": {
          "enfileirados": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "semTelefone": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "viagem": {
            "$ref": "#/components/schemas/ViagemDaFrota"
          }
        }
      },
      "ResumoDasCriancas": {
        "required": [
          "criancas",
          "ate2Anos",
          "emDia",
          "vacinaAtrasada",
          "vacinasEmDia",
          "comUrgencia",
          "microareas",
          "pendencias",
          "leitura",
          "unidades",
          "semCadastro"
        ],
        "type": "object",
        "properties": {
          "criancas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ate2Anos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "emDia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "vacinaAtrasada": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "vacinasEmDia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "comUrgencia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "microareas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MicroareaDoAcompanhamento"
            }
          },
          "pendencias": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContagemDePendencia"
            }
          },
          "leitura": {
            "$ref": "#/components/schemas/LeituraDoAcompanhamento"
          },
          "unidades": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "semCadastro": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "semVacina": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          }
        }
      },
      "ResumoDasGestantes": {
        "required": [
          "gestantes",
          "puerperas",
          "altoRisco",
          "comUrgencia",
          "microareas",
          "pendencias",
          "leitura"
        ],
        "type": "object",
        "properties": {
          "gestantes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "puerperas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "altoRisco": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "comUrgencia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "microareas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MicroareaDasGestantes"
            }
          },
          "pendencias": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContagemDePendencia"
            }
          },
          "leitura": {
            "$ref": "#/components/schemas/LeituraDoAcompanhamento"
          },
          "unidades": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "noApp": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          },
          "disseramJaFiz": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          }
        }
      },
      "ResumoDasMarcacoes": {
        "required": [
          "de",
          "ate",
          "marcacoes",
          "pessoas",
          "semCarro",
          "dias"
        ],
        "type": "object",
        "properties": {
          "de": {
            "type": "string",
            "format": "date"
          },
          "ate": {
            "type": "string",
            "format": "date"
          },
          "marcacoes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "semCarro": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dias": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiaDeMarcacoes"
            }
          }
        }
      },
      "ResumoDasMulheres": {
        "required": [
          "mulheres",
          "emDia",
          "idadeDoPreventivo",
          "preventivoEmDia",
          "idadeDaMamografia",
          "mamografiaEmDia",
          "microareas",
          "pendencias",
          "leitura",
          "unidades",
          "semCadastro"
        ],
        "type": "object",
        "properties": {
          "mulheres": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "emDia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "idadeDoPreventivo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "preventivoEmDia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "idadeDaMamografia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "mamografiaEmDia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "microareas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MicroareaDoAcompanhamento"
            }
          },
          "pendencias": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContagemDePendencia"
            }
          },
          "leitura": {
            "$ref": "#/components/schemas/LeituraDoAcompanhamento"
          },
          "unidades": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "semCadastro": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ResumoDasVacinasDosJovens": {
        "required": [
          "total",
          "emDia",
          "atrasada",
          "semRegistro",
          "naoSabemos",
          "microareas",
          "leitura",
          "unidades",
          "semCadastro",
          "naoInformadas"
        ],
        "type": "object",
        "properties": {
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "emDia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "atrasada": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "semRegistro": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "naoSabemos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "microareas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MicroareaDasVacinas"
            }
          },
          "leitura": {
            "$ref": "#/components/schemas/LeituraDoAcompanhamento"
          },
          "unidades": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "semCadastro": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "naoInformadas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ResumoDasViagens": {
        "required": [
          "de",
          "ate",
          "viagens",
          "pacientes",
          "kmRodados",
          "aConfirmar",
          "dias"
        ],
        "type": "object",
        "properties": {
          "de": {
            "type": "string",
            "format": "date"
          },
          "ate": {
            "type": "string",
            "format": "date"
          },
          "viagens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pacientes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "kmRodados": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "aConfirmar": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dias": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiaDeViagens"
            }
          }
        }
      },
      "ResumoDosAvisos": {
        "required": [
          "pacientesAvisados",
          "pacientesPorAvisar",
          "semTelefone",
          "motorista",
          "motoristaPorAvisar",
          "naoVao"
        ],
        "type": "object",
        "properties": {
          "pacientesAvisados": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pacientesPorAvisar": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "semTelefone": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "motorista": {
            "type": [
              "null",
              "string"
            ]
          },
          "motoristaPorAvisar": {
            "type": "boolean"
          },
          "naoVao": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ResumoDosCronicos": {
        "required": [
          "condicao",
          "pessoas",
          "emDia",
          "comUrgencia",
          "pressaoAlta",
          "microareas",
          "pendencias",
          "leitura",
          "unidades",
          "semCadastro"
        ],
        "type": "object",
        "properties": {
          "condicao": {
            "type": "string"
          },
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "emDia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "comUrgencia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pressaoAlta": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "microareas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MicroareaDoAcompanhamento"
            }
          },
          "pendencias": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContagemDePendencia"
            }
          },
          "leitura": {
            "$ref": "#/components/schemas/LeituraDoAcompanhamento"
          },
          "unidades": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "semCadastro": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ResumoDosIdosos": {
        "required": [
          "pessoas",
          "emDia",
          "semIvcf",
          "riscoAlto",
          "comUrgencia",
          "microareas",
          "pendencias",
          "leitura",
          "unidades",
          "semCadastro"
        ],
        "type": "object",
        "properties": {
          "pessoas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "emDia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "semIvcf": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "riscoAlto": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "comUrgencia": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "microareas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MicroareaDoAcompanhamento"
            }
          },
          "pendencias": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContagemDePendencia"
            }
          },
          "leitura": {
            "$ref": "#/components/schemas/LeituraDoAcompanhamento"
          },
          "unidades": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "semCadastro": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "RetiradaEnviada": {
        "required": [
          "remedios",
          "data",
          "quemRetirou"
        ],
        "type": "object",
        "properties": {
          "remedios": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          "data": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "quemRetirou": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RetiradaNoCartao": {
        "required": [
          "id",
          "data",
          "quantidade",
          "quemRetirou",
          "registradoPor",
          "podeDesfazer"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "data": {
            "type": "string",
            "format": "date"
          },
          "quantidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "quemRetirou": {
            "type": [
              "null",
              "string"
            ]
          },
          "registradoPor": {
            "type": "string"
          },
          "podeDesfazer": {
            "type": "boolean"
          }
        }
      },
      "RoteiroAnterior": {
        "required": [
          "dia",
          "casas",
          "feitas"
        ],
        "type": "object",
        "properties": {
          "dia": {
            "type": "string",
            "format": "date"
          },
          "casas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "feitas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ausentes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          },
          "recusadas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          }
        }
      },
      "RoteiroDaAcs": {
        "required": [
          "microarea",
          "agente",
          "dia",
          "combinado",
          "combinadoEm",
          "combinadoPor",
          "carteira",
          "visitadasNoMes",
          "faltam",
          "fimDaJanela",
          "diasDeTrabalho",
          "cota",
          "cotaNecessaria",
          "cabe",
          "casas"
        ],
        "type": "object",
        "properties": {
          "microarea": {
            "type": "string"
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "dia": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "combinado": {
            "type": "boolean"
          },
          "combinadoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "combinadoPor": {
            "type": [
              "null",
              "string"
            ]
          },
          "carteira": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "visitadasNoMes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "faltam": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "fimDaJanela": {
            "type": "string",
            "format": "date"
          },
          "diasDeTrabalho": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cota": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cotaNecessaria": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cabe": {
            "type": "boolean"
          },
          "casas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CasaDoRoteiro"
            }
          },
          "teto": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          },
          "foraDoMes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          },
          "semListas": {
            "type": "boolean",
            "default": false
          },
          "unidade": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "Saude": {
        "required": [
          "situacao",
          "versao",
          "versaoDoEsquema"
        ],
        "type": "object",
        "properties": {
          "situacao": {
            "type": "string"
          },
          "versao": {
            "type": "string"
          },
          "versaoDoEsquema": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SegredoDoAutenticador": {
        "required": [
          "segredo",
          "uri"
        ],
        "type": "object",
        "properties": {
          "segredo": {
            "type": "string"
          },
          "uri": {
            "type": "string"
          }
        }
      },
      "SegundoFatorDaConta": {
        "required": [
          "ligado",
          "ligadoEm",
          "codigosDeRecuperacaoDisponiveis"
        ],
        "type": "object",
        "properties": {
          "ligado": {
            "type": "boolean"
          },
          "ligadoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "codigosDeRecuperacaoDisponiveis": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ServicoDaAgenda": {
        "required": [
          "id",
          "nome",
          "duracaoMinutos",
          "area",
          "ativo"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "duracaoMinutos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "area": {
            "type": [
              "null",
              "string"
            ]
          },
          "ativo": {
            "type": "boolean"
          }
        }
      },
      "ServicoEnviado": {
        "required": [
          "nome",
          "duracaoMinutos",
          "area"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "duracaoMinutos": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "area": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SessaoAtual": {
        "required": [
          "usuario",
          "orgaoAtivo",
          "expiraEm",
          "token"
        ],
        "type": "object",
        "properties": {
          "usuario": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UsuarioDaSessao"
              }
            ]
          },
          "orgaoAtivo": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrgaoResumo"
              }
            ]
          },
          "expiraEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "token": {
            "type": [
              "null",
              "string"
            ]
          },
          "aguardandoSegundoFator": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "SessaoDeAuriculoDaFicha": {
        "required": [
          "id",
          "numero",
          "data",
          "agendamentoId",
          "orelha",
          "escalaAntes",
          "escalaDepois",
          "reacoes",
          "nota",
          "pontos"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "numero": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "data": {
            "type": "string"
          },
          "agendamentoId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "orelha": {
            "type": "string"
          },
          "escalaAntes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "escalaDepois": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "reacoes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "nota": {
            "type": [
              "null",
              "string"
            ]
          },
          "pontos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PontoDeAuriculo"
            }
          }
        }
      },
      "SessaoDeAuriculoEnviada": {
        "required": [
          "data",
          "agendamentoId",
          "orelha",
          "escalaAntes",
          "escalaDepois",
          "reacoes",
          "nota",
          "pontos"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": [
              "null",
              "string"
            ]
          },
          "agendamentoId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "orelha": {
            "type": [
              "null",
              "string"
            ]
          },
          "escalaAntes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "escalaDepois": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "reacoes": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "nota": {
            "type": [
              "null",
              "string"
            ]
          },
          "pontos": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PontoDeAuriculo"
            }
          }
        }
      },
      "SituacaoDaCivi": {
        "required": [
          "conversa",
          "conversasRestantesHoje"
        ],
        "type": "object",
        "properties": {
          "conversa": {
            "type": "boolean"
          },
          "conversasRestantesHoje": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SituacaoDoWhatsApp": {
        "required": [
          "estado",
          "numero",
          "nome",
          "mensagem"
        ],
        "type": "object",
        "properties": {
          "estado": {
            "type": "string"
          },
          "numero": {
            "type": [
              "null",
              "string"
            ]
          },
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "mensagem": {
            "type": "string"
          }
        }
      },
      "SobreDoApp": {
        "required": [
          "texto",
          "prefeito",
          "secretario",
          "endereco",
          "telefone",
          "horario",
          "site",
          "instagram"
        ],
        "type": "object",
        "properties": {
          "texto": {
            "type": [
              "null",
              "string"
            ]
          },
          "prefeito": {
            "type": [
              "null",
              "string"
            ]
          },
          "secretario": {
            "type": [
              "null",
              "string"
            ]
          },
          "endereco": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "horario": {
            "type": [
              "null",
              "string"
            ]
          },
          "site": {
            "type": [
              "null",
              "string"
            ]
          },
          "instagram": {
            "type": [
              "null",
              "string"
            ]
          },
          "gestao": {
            "type": [
              "null",
              "string"
            ]
          },
          "cargoDoSecretario": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SugestaoDeConclusao": {
        "required": [
          "kmSaida",
          "retornoEm"
        ],
        "type": "object",
        "properties": {
          "kmSaida": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "retornoEm": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SugestaoDeDependente": {
        "required": [
          "id",
          "nome",
          "nascimento",
          "motivo",
          "parentesco"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "nascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "motivo": {
            "type": "string"
          },
          "parentesco": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SugestaoDeGenerico": {
        "required": [
          "numero",
          "pacientes",
          "casas"
        ],
        "type": "object",
        "properties": {
          "numero": {
            "type": "string"
          },
          "pacientes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "casas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "TelefoneDaCasaEnviado": {
        "required": [
          "domicilioId",
          "telefone",
          "de",
          "parentesco",
          "segundoTelefone",
          "segundoDe"
        ],
        "type": "object",
        "properties": {
          "domicilioId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "de": {
            "type": [
              "null",
              "string"
            ]
          },
          "parentesco": {
            "type": [
              "null",
              "string"
            ]
          },
          "segundoTelefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "segundoDe": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TelefoneDaVez": {
        "required": [
          "pacienteId",
          "nome",
          "precisaDoCelular",
          "celular",
          "motivo",
          "semTelefoneEm",
          "contatoTelefone",
          "contatoNome",
          "casa",
          "sugestoes",
          "perguntar"
        ],
        "type": "object",
        "properties": {
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "precisaDoCelular": {
            "type": "boolean"
          },
          "celular": {
            "type": [
              "null",
              "string"
            ]
          },
          "motivo": {
            "type": [
              "null",
              "string"
            ]
          },
          "semTelefoneEm": {
            "type": [
              "null",
              "string"
            ]
          },
          "contatoTelefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "contatoNome": {
            "type": [
              "null",
              "string"
            ]
          },
          "casa": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CasaDoPaciente"
              }
            ]
          },
          "sugestoes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TelefoneSugerido"
            }
          },
          "perguntar": {
            "type": "boolean"
          }
        }
      },
      "TelefoneGenericoDaLista": {
        "required": [
          "id",
          "numero",
          "motivo",
          "criadoEm",
          "criadoPor"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "numero": {
            "type": "string"
          },
          "motivo": {
            "type": [
              "null",
              "string"
            ]
          },
          "criadoEm": {
            "type": "string"
          },
          "criadoPor": {
            "type": "string"
          }
        }
      },
      "TelefoneGenericoEnviado": {
        "required": [
          "numero",
          "motivo"
        ],
        "type": "object",
        "properties": {
          "numero": {
            "type": [
              "null",
              "string"
            ]
          },
          "motivo": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TelefonesEnviados": {
        "required": [
          "telefone",
          "telefoneContato",
          "contatoNome"
        ],
        "type": "object",
        "properties": {
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefoneContato": {
            "type": [
              "null",
              "string"
            ]
          },
          "contatoNome": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TelefoneSugerido": {
        "required": [
          "nome",
          "parentesco",
          "telefone"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": "string"
          },
          "parentesco": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": "string"
          }
        }
      },
      "TenantResumo": {
        "required": [
          "codigo",
          "nome"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string",
            "format": "uuid"
          },
          "nome": {
            "type": "string"
          }
        }
      },
      "TratamentoDeAuriculoDaFicha": {
        "required": [
          "id",
          "profissional",
          "inicio",
          "sessoesPrevistas",
          "queixa",
          "objetivos",
          "jaFez",
          "contraindicacoes",
          "altaEm",
          "altaMotivo",
          "altaNota",
          "sessoes"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "profissional": {
            "type": "string"
          },
          "inicio": {
            "type": "string"
          },
          "sessoesPrevistas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "queixa": {
            "type": "string"
          },
          "objetivos": {
            "type": [
              "null",
              "string"
            ]
          },
          "jaFez": {
            "type": "boolean"
          },
          "contraindicacoes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "altaEm": {
            "type": [
              "null",
              "string"
            ]
          },
          "altaMotivo": {
            "type": [
              "null",
              "string"
            ]
          },
          "altaNota": {
            "type": [
              "null",
              "string"
            ]
          },
          "sessoes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessaoDeAuriculoDaFicha"
            }
          }
        }
      },
      "TratamentoDeAuriculoDaLista": {
        "required": [
          "id",
          "pacienteId",
          "paciente",
          "profissional",
          "inicio",
          "feitas",
          "previstas",
          "ultimaEscalaAntes",
          "ultimaEscalaDepois",
          "ultimaSessao",
          "altaEm"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "paciente": {
            "type": "string"
          },
          "profissional": {
            "type": "string"
          },
          "inicio": {
            "type": "string"
          },
          "feitas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "previstas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ultimaEscalaAntes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ultimaEscalaDepois": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ultimaSessao": {
            "type": [
              "null",
              "string"
            ]
          },
          "altaEm": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TratamentoDeAuriculoEnviado": {
        "required": [
          "pacienteId",
          "sessoesPrevistas",
          "queixa",
          "objetivos",
          "jaFez",
          "contraindicacoes"
        ],
        "type": "object",
        "properties": {
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "sessoesPrevistas": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "queixa": {
            "type": [
              "null",
              "string"
            ]
          },
          "objetivos": {
            "type": [
              "null",
              "string"
            ]
          },
          "jaFez": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "contraindicacoes": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UfResposta": {
        "required": [
          "codigo",
          "sigla",
          "nome",
          "regiao"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "sigla": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "regiao": {
            "type": "string"
          }
        }
      },
      "UltimoAtendimentoDoPec": {
        "required": [
          "em",
          "profissional",
          "ocupacao"
        ],
        "type": "object",
        "properties": {
          "em": {
            "type": "string",
            "format": "date-time"
          },
          "profissional": {
            "type": "string"
          },
          "ocupacao": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UltimoAviso": {
        "required": [
          "situacao",
          "em",
          "saidaAvisada",
          "desatualizado",
          "erro",
          "resposta"
        ],
        "type": "object",
        "properties": {
          "situacao": {
            "type": "string"
          },
          "em": {
            "type": "string"
          },
          "saidaAvisada": {
            "type": "string"
          },
          "desatualizado": {
            "type": "boolean"
          },
          "erro": {
            "type": [
              "null",
              "string"
            ]
          },
          "resposta": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UnidadeDaAgenda": {
        "required": [
          "id",
          "nome",
          "endereco",
          "telefone",
          "ativa"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "endereco": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "ativa": {
            "type": "boolean"
          },
          "telefoneDeAtendimento": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UnidadeEnviada": {
        "required": [
          "nome",
          "endereco",
          "telefone"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "endereco": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefoneDeAtendimento": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UnidadeResumida": {
        "required": [
          "id",
          "nome"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          }
        }
      },
      "UnidadesDaConta": {
        "required": [
          "todas",
          "unidades"
        ],
        "type": "object",
        "properties": {
          "todas": {
            "type": "boolean"
          },
          "unidades": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnidadeResumida"
            }
          }
        }
      },
      "UsuarioDaSessao": {
        "required": [
          "codigo",
          "nome",
          "email",
          "papel",
          "papelRotulo",
          "podeEscrever",
          "podeAdministrarUsuarios",
          "podeAdministrarOrgaos",
          "podeTrocarDeOrgao",
          "podeGerirTransporte",
          "modulosDoPapel",
          "painel",
          "paineis",
          "podeGerirAgenda"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string",
            "format": "uuid"
          },
          "nome": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "papel": {
            "type": "string"
          },
          "papelRotulo": {
            "type": "string"
          },
          "podeEscrever": {
            "type": "boolean"
          },
          "podeAdministrarUsuarios": {
            "type": "boolean"
          },
          "podeAdministrarOrgaos": {
            "type": "boolean"
          },
          "podeTrocarDeOrgao": {
            "type": "boolean"
          },
          "podeGerirTransporte": {
            "type": "boolean"
          },
          "modulosDoPapel": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "painel": {
            "type": [
              "null",
              "string"
            ]
          },
          "paineis": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "podeGerirAgenda": {
            "type": "boolean"
          },
          "tenant": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TenantResumo"
              }
            ]
          },
          "podeAdministrarClientes": {
            "type": "boolean",
            "default": false
          },
          "senhaProvisoria": {
            "type": "boolean",
            "default": false
          },
          "temSegundoFator": {
            "type": "boolean",
            "default": false
          },
          "soAPropriaAgenda": {
            "type": "boolean",
            "default": false
          },
          "soAPropriaMicroarea": {
            "type": "boolean",
            "default": false
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "soAFarmacia": {
            "type": "boolean",
            "default": false
          },
          "soARecepcao": {
            "type": "boolean",
            "default": false
          },
          "foto": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UsuarioResumo": {
        "required": [
          "codigo",
          "nome",
          "email",
          "papel",
          "papelRotulo",
          "orgaoCodigo",
          "orgaoNome",
          "ativo",
          "criadoEm",
          "ultimoAcessoEm",
          "paineis"
        ],
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string",
            "format": "uuid"
          },
          "nome": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "papel": {
            "type": "string"
          },
          "papelRotulo": {
            "type": "string"
          },
          "orgaoCodigo": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "orgaoNome": {
            "type": [
              "null",
              "string"
            ]
          },
          "ativo": {
            "type": "boolean"
          },
          "criadoEm": {
            "type": "string",
            "format": "date-time"
          },
          "ultimoAcessoEm": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "paineis": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tenant": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TenantResumo"
              }
            ]
          },
          "senhaProvisoria": {
            "type": "boolean",
            "default": false
          },
          "celular": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "VacinaNoPec": {
        "required": [
          "nome",
          "dose",
          "aplicada",
          "aprazada"
        ],
        "type": "object",
        "properties": {
          "nome": {
            "type": "string"
          },
          "dose": {
            "type": [
              "null",
              "string"
            ]
          },
          "aplicada": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "aprazada": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "ValorDaFaixa": {
        "required": [
          "faixa",
          "rotulo",
          "valorMensal"
        ],
        "type": "object",
        "properties": {
          "faixa": {
            "type": "string"
          },
          "rotulo": {
            "type": "string"
          },
          "valorMensal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "VeiculoDaFrota": {
        "required": [
          "id",
          "marca",
          "modelo",
          "placa",
          "ocupacao",
          "ativo"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "marca": {
            "type": "string"
          },
          "modelo": {
            "type": "string"
          },
          "placa": {
            "type": [
              "null",
              "string"
            ]
          },
          "ocupacao": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ativo": {
            "type": "boolean"
          }
        }
      },
      "VeiculoEnviado": {
        "required": [
          "marca",
          "modelo",
          "ocupacao",
          "placa"
        ],
        "type": "object",
        "properties": {
          "marca": {
            "type": [
              "null",
              "string"
            ]
          },
          "modelo": {
            "type": [
              "null",
              "string"
            ]
          },
          "ocupacao": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "placa": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ViagemDaFrota": {
        "required": [
          "id",
          "saida",
          "retornoPrevisto",
          "retornoEm",
          "motoristaId",
          "motorista",
          "veiculoId",
          "veiculo",
          "placa",
          "ocupacao",
          "destinoCidade",
          "destinoLocal",
          "observacao",
          "situacao",
          "revisar",
          "kmSaida",
          "kmRetorno",
          "kmRodados",
          "motivoCancelamento",
          "minutosDeEstrada",
          "passageiros",
          "ajustada",
          "carroEmOutraViagem",
          "motoristaImpedido",
          "avisos"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "saida": {
            "type": "string"
          },
          "retornoPrevisto": {
            "type": [
              "null",
              "string"
            ]
          },
          "retornoEm": {
            "type": [
              "null",
              "string"
            ]
          },
          "motoristaId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "motorista": {
            "type": [
              "null",
              "string"
            ]
          },
          "veiculoId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "veiculo": {
            "type": "string"
          },
          "placa": {
            "type": [
              "null",
              "string"
            ]
          },
          "ocupacao": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "destinoCidade": {
            "type": "string"
          },
          "destinoLocal": {
            "type": [
              "null",
              "string"
            ]
          },
          "observacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "situacao": {
            "type": "string"
          },
          "revisar": {
            "type": "boolean"
          },
          "kmSaida": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "kmRetorno": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "kmRodados": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "motivoCancelamento": {
            "type": [
              "null",
              "string"
            ]
          },
          "minutosDeEstrada": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "passageiros": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PassageiroDaViagem"
            }
          },
          "ajustada": {
            "type": "boolean"
          },
          "carroEmOutraViagem": {
            "type": "boolean"
          },
          "motoristaImpedido": {
            "type": [
              "null",
              "string"
            ]
          },
          "avisos": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ResumoDosAvisos"
              }
            ]
          }
        }
      },
      "ViagemEnviada": {
        "required": [
          "veiculoId",
          "motoristaId",
          "saida",
          "retornoPrevisto",
          "destinoCidade",
          "destinoLocal",
          "observacao",
          "passageiros"
        ],
        "type": "object",
        "properties": {
          "veiculoId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "motoristaId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "saida": {
            "type": [
              "null",
              "string"
            ]
          },
          "retornoPrevisto": {
            "type": [
              "null",
              "string"
            ]
          },
          "destinoCidade": {
            "type": [
              "null",
              "string"
            ]
          },
          "destinoLocal": {
            "type": [
              "null",
              "string"
            ]
          },
          "observacao": {
            "type": [
              "null",
              "string"
            ]
          },
          "passageiros": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PassageiroEnviado"
            }
          }
        }
      },
      "VinculoEnviado": {
        "required": [
          "dependenteId",
          "parentesco"
        ],
        "type": "object",
        "properties": {
          "dependenteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "parentesco": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "VinculoNoPainel": {
        "required": [
          "pacienteId",
          "nome",
          "nascimento",
          "parentesco",
          "origem",
          "usaOApp"
        ],
        "type": "object",
        "properties": {
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "nascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "parentesco": {
            "type": [
              "null",
              "string"
            ]
          },
          "origem": {
            "type": "string"
          },
          "usaOApp": {
            "type": "boolean"
          }
        }
      },
      "VisitaDaAcs": {
        "required": [
          "pacienteId",
          "nome",
          "nascimento",
          "telefone",
          "endereco",
          "microarea",
          "agente",
          "ultimaVisita",
          "urgente",
          "motivos"
        ],
        "type": "object",
        "properties": {
          "pacienteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "nome": {
            "type": [
              "null",
              "string"
            ]
          },
          "nascimento": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "telefone": {
            "type": [
              "null",
              "string"
            ]
          },
          "endereco": {
            "type": [
              "null",
              "string"
            ]
          },
          "microarea": {
            "type": [
              "null",
              "string"
            ]
          },
          "agente": {
            "type": [
              "null",
              "string"
            ]
          },
          "ultimaVisita": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "urgente": {
            "type": "boolean"
          },
          "motivos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MotivoDaVisita"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Operação"
    },
    {
      "name": "Sessões"
    },
    {
      "name": "Órgãos"
    },
    {
      "name": "Usuários"
    },
    {
      "name": "Perfil"
    },
    {
      "name": "Base pública"
    },
    {
      "name": "Comunicação"
    },
    {
      "name": "Módulos"
    },
    {
      "name": "Senha"
    },
    {
      "name": "Painéis"
    },
    {
      "name": "App da população"
    },
    {
      "name": "Transporte · Veículos"
    },
    {
      "name": "Transporte · Motoristas"
    },
    {
      "name": "Transporte · Pacientes"
    },
    {
      "name": "Transporte · Marcação"
    },
    {
      "name": "Transporte · Viagens"
    },
    {
      "name": "Recepção"
    },
    {
      "name": "Agenda"
    },
    {
      "name": "Campanha do telefone"
    },
    {
      "name": "Auriculoterapia"
    },
    {
      "name": "Pacientes"
    },
    {
      "name": "Pacientes · Configurações"
    },
    {
      "name": "Pacientes · Recados do app"
    },
    {
      "name": "Pacientes · Gestantes"
    },
    {
      "name": "Pacientes · Hipertensos e diabéticos"
    },
    {
      "name": "Pacientes · Crianças"
    },
    {
      "name": "Pacientes · Vacinas de 5 a 19 anos"
    },
    {
      "name": "Pacientes · Pessoas idosas"
    },
    {
      "name": "Pacientes · Saúde da mulher"
    },
    {
      "name": "Pacientes · Visitas da ACS"
    },
    {
      "name": "Pacientes · O que fazer"
    },
    {
      "name": "Pacientes · Domicílios"
    }
  ]
}