{
  "openapi" : "3.0.3",
  "info" : {
    "title" : "HubSaúde — API FHIR R4 (derivada do CapabilityStatement)",
    "version" : "0.3.15",
    "description" : "ATENÇÃO: documento DERIVADO e NÃO-NORMATIVO. O contrato FHIR normativo do HubSaúde é o conjunto de CapabilityStatements publicado no FHIR NPM Package hubsaude-capabilities (.tgz), aplicado pelo gateway em runtime. Este OpenAPI é regenerado a cada build a partir desses CapabilityStatements para uso por ferramentas do ecossistema OpenAPI. Em caso de divergência, prevalece o CapabilityStatement."
  },
  "servers" : [ {
    "url" : "https://hub.saude.go.gov.br/fhir",
    "description" : "Endpoint FHIR R4 do HubSaúde (gateway)"
  } ],
  "tags" : [ {
    "name" : "AllergyIntolerance",
    "description" : "Interações declaradas para o recurso AllergyIntolerance"
  }, {
    "name" : "AuditEvent",
    "description" : "Interações declaradas para o recurso AuditEvent"
  }, {
    "name" : "Bundle",
    "description" : "Interações declaradas para o recurso Bundle"
  }, {
    "name" : "Condition",
    "description" : "Interações declaradas para o recurso Condition"
  }, {
    "name" : "Consent",
    "description" : "Interações declaradas para o recurso Consent"
  }, {
    "name" : "DocumentReference",
    "description" : "Interações declaradas para o recurso DocumentReference"
  }, {
    "name" : "Encounter",
    "description" : "Interações declaradas para o recurso Encounter"
  }, {
    "name" : "Immunization",
    "description" : "Interações declaradas para o recurso Immunization"
  }, {
    "name" : "MedicationRequest",
    "description" : "Interações declaradas para o recurso MedicationRequest"
  }, {
    "name" : "Observation",
    "description" : "Interações declaradas para o recurso Observation"
  }, {
    "name" : "Patient",
    "description" : "Interações declaradas para o recurso Patient"
  }, {
    "name" : "Procedure",
    "description" : "Interações declaradas para o recurso Procedure"
  }, {
    "name" : "Subscription",
    "description" : "Interações declaradas para o recurso Subscription"
  }, {
    "name" : "Task",
    "description" : "Interações declaradas para o recurso Task"
  } ],
  "paths" : {
    "/metadata" : {
      "get" : {
        "operationId" : "capabilities",
        "summary" : "Recupera o CapabilityStatement do servidor (interação capabilities)",
        "tags" : [ "CapabilityStatement" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CapabilityStatement"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/AllergyIntolerance" : {
      "post" : {
        "operationId" : "createAllergyIntolerance",
        "summary" : "Cria um novo AllergyIntolerance (interação create)",
        "tags" : [ "AllergyIntolerance" ],
        "responses" : {
          "201" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "description" : "Recurso AllergyIntolerance em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      },
      "get" : {
        "operationId" : "searchAllergyIntolerance",
        "summary" : "Busca recursos AllergyIntolerance por parâmetros (interação search-type)",
        "tags" : [ "AllergyIntolerance" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/AllergyIntolerance/{id}" : {
      "get" : {
        "operationId" : "readAllergyIntolerance",
        "summary" : "Lê o AllergyIntolerance corrente pelo id (interação read)",
        "tags" : [ "AllergyIntolerance" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso AllergyIntolerance",
          "schema" : {
            "type" : "string"
          }
        } ]
      },
      "put" : {
        "operationId" : "updateAllergyIntolerance",
        "summary" : "Atualiza (ou cria com id conhecido) o AllergyIntolerance (interação update)",
        "tags" : [ "AllergyIntolerance" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso AllergyIntolerance",
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "required" : true,
          "description" : "Recurso AllergyIntolerance em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      }
    },
    "/AuditEvent" : {
      "post" : {
        "operationId" : "createAuditEvent",
        "summary" : "Cria um novo AuditEvent (interação create)",
        "tags" : [ "AuditEvent" ],
        "responses" : {
          "201" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "description" : "Recurso AuditEvent em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      },
      "get" : {
        "operationId" : "searchAuditEvent",
        "summary" : "Busca recursos AuditEvent por parâmetros (interação search-type)",
        "tags" : [ "AuditEvent" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/AuditEvent/{id}" : {
      "get" : {
        "operationId" : "readAuditEvent",
        "summary" : "Lê o AuditEvent corrente pelo id (interação read)",
        "tags" : [ "AuditEvent" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso AuditEvent",
          "schema" : {
            "type" : "string"
          }
        } ]
      }
    },
    "/Bundle" : {
      "post" : {
        "operationId" : "createBundle",
        "summary" : "Cria um novo Bundle (interação create)",
        "tags" : [ "Bundle" ],
        "responses" : {
          "201" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Bundle em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      }
    },
    "/Bundle/{id}" : {
      "get" : {
        "operationId" : "readBundle",
        "summary" : "Lê o Bundle corrente pelo id (interação read)",
        "tags" : [ "Bundle" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Bundle",
          "schema" : {
            "type" : "string"
          }
        } ]
      }
    },
    "/Condition" : {
      "post" : {
        "operationId" : "createCondition",
        "summary" : "Cria um novo Condition (interação create)",
        "tags" : [ "Condition" ],
        "responses" : {
          "201" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Condition em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      },
      "get" : {
        "operationId" : "searchCondition",
        "summary" : "Busca recursos Condition por parâmetros (interação search-type)",
        "tags" : [ "Condition" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/Condition/{id}" : {
      "get" : {
        "operationId" : "readCondition",
        "summary" : "Lê o Condition corrente pelo id (interação read)",
        "tags" : [ "Condition" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Condition",
          "schema" : {
            "type" : "string"
          }
        } ]
      },
      "put" : {
        "operationId" : "updateCondition",
        "summary" : "Atualiza (ou cria com id conhecido) o Condition (interação update)",
        "tags" : [ "Condition" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Condition",
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Condition em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      }
    },
    "/Consent" : {
      "post" : {
        "operationId" : "createConsent",
        "summary" : "Cria um novo Consent (interação create)",
        "tags" : [ "Consent" ],
        "responses" : {
          "201" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Consent em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      },
      "get" : {
        "operationId" : "searchConsent",
        "summary" : "Busca recursos Consent por parâmetros (interação search-type)",
        "tags" : [ "Consent" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/Consent/_history" : {
      "get" : {
        "operationId" : "historyTypeConsent",
        "summary" : "Histórico do tipo Consent (interação history-type)",
        "tags" : [ "Consent" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/Consent/{id}" : {
      "delete" : {
        "operationId" : "deleteConsent",
        "summary" : "Remove o Consent (interação delete)",
        "tags" : [ "Consent" ],
        "responses" : {
          "204" : {
            "description" : "Recurso removido"
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Consent",
          "schema" : {
            "type" : "string"
          }
        } ]
      },
      "patch" : {
        "operationId" : "patchConsent",
        "summary" : "Aplica alteração parcial ao Consent (interação patch)",
        "tags" : [ "Consent" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Consent",
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Consent em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      },
      "get" : {
        "operationId" : "readConsent",
        "summary" : "Lê o Consent corrente pelo id (interação read)",
        "tags" : [ "Consent" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Consent",
          "schema" : {
            "type" : "string"
          }
        } ]
      },
      "put" : {
        "operationId" : "updateConsent",
        "summary" : "Atualiza (ou cria com id conhecido) o Consent (interação update)",
        "tags" : [ "Consent" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Consent",
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Consent em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      }
    },
    "/Consent/{id}/_history" : {
      "get" : {
        "operationId" : "historyInstanceConsent",
        "summary" : "Histórico de uma instância de Consent (interação history-instance)",
        "tags" : [ "Consent" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Consent",
          "schema" : {
            "type" : "string"
          }
        } ]
      }
    },
    "/Consent/{id}/_history/{vid}" : {
      "get" : {
        "operationId" : "vreadConsent",
        "summary" : "Lê uma versão específica do Consent (interação vread)",
        "tags" : [ "Consent" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Consent",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "vid",
          "in" : "path",
          "required" : true,
          "description" : "Id da versão do recurso Consent",
          "schema" : {
            "type" : "string"
          }
        } ]
      }
    },
    "/DocumentReference" : {
      "post" : {
        "operationId" : "createDocumentReference",
        "summary" : "Cria um novo DocumentReference (interação create)",
        "tags" : [ "DocumentReference" ],
        "responses" : {
          "201" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "description" : "Recurso DocumentReference em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      },
      "get" : {
        "operationId" : "searchDocumentReference",
        "summary" : "Busca recursos DocumentReference por parâmetros (interação search-type)",
        "tags" : [ "DocumentReference" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/DocumentReference/{id}" : {
      "get" : {
        "operationId" : "readDocumentReference",
        "summary" : "Lê o DocumentReference corrente pelo id (interação read)",
        "tags" : [ "DocumentReference" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso DocumentReference",
          "schema" : {
            "type" : "string"
          }
        } ]
      }
    },
    "/Encounter" : {
      "post" : {
        "operationId" : "createEncounter",
        "summary" : "Cria um novo Encounter (interação create)",
        "tags" : [ "Encounter" ],
        "responses" : {
          "201" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Encounter em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      },
      "get" : {
        "operationId" : "searchEncounter",
        "summary" : "Busca recursos Encounter por parâmetros (interação search-type)",
        "tags" : [ "Encounter" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/Encounter/{id}" : {
      "patch" : {
        "operationId" : "patchEncounter",
        "summary" : "Aplica alteração parcial ao Encounter (interação patch)",
        "tags" : [ "Encounter" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Encounter",
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Encounter em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      },
      "get" : {
        "operationId" : "readEncounter",
        "summary" : "Lê o Encounter corrente pelo id (interação read)",
        "tags" : [ "Encounter" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Encounter",
          "schema" : {
            "type" : "string"
          }
        } ]
      },
      "put" : {
        "operationId" : "updateEncounter",
        "summary" : "Atualiza (ou cria com id conhecido) o Encounter (interação update)",
        "tags" : [ "Encounter" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Encounter",
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Encounter em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      }
    },
    "/Encounter/{id}/_history/{vid}" : {
      "get" : {
        "operationId" : "vreadEncounter",
        "summary" : "Lê uma versão específica do Encounter (interação vread)",
        "tags" : [ "Encounter" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Encounter",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "vid",
          "in" : "path",
          "required" : true,
          "description" : "Id da versão do recurso Encounter",
          "schema" : {
            "type" : "string"
          }
        } ]
      }
    },
    "/Immunization" : {
      "post" : {
        "operationId" : "createImmunization",
        "summary" : "Cria um novo Immunization (interação create)",
        "tags" : [ "Immunization" ],
        "responses" : {
          "201" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Immunization em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      },
      "get" : {
        "operationId" : "searchImmunization",
        "summary" : "Busca recursos Immunization por parâmetros (interação search-type)",
        "tags" : [ "Immunization" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/Immunization/{id}" : {
      "get" : {
        "operationId" : "readImmunization",
        "summary" : "Lê o Immunization corrente pelo id (interação read)",
        "tags" : [ "Immunization" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Immunization",
          "schema" : {
            "type" : "string"
          }
        } ]
      }
    },
    "/MedicationRequest" : {
      "post" : {
        "operationId" : "createMedicationRequest",
        "summary" : "Cria um novo MedicationRequest (interação create)",
        "tags" : [ "MedicationRequest" ],
        "responses" : {
          "201" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "description" : "Recurso MedicationRequest em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      },
      "get" : {
        "operationId" : "searchMedicationRequest",
        "summary" : "Busca recursos MedicationRequest por parâmetros (interação search-type)",
        "tags" : [ "MedicationRequest" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/MedicationRequest/{id}" : {
      "get" : {
        "operationId" : "readMedicationRequest",
        "summary" : "Lê o MedicationRequest corrente pelo id (interação read)",
        "tags" : [ "MedicationRequest" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso MedicationRequest",
          "schema" : {
            "type" : "string"
          }
        } ]
      },
      "put" : {
        "operationId" : "updateMedicationRequest",
        "summary" : "Atualiza (ou cria com id conhecido) o MedicationRequest (interação update)",
        "tags" : [ "MedicationRequest" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso MedicationRequest",
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "required" : true,
          "description" : "Recurso MedicationRequest em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      }
    },
    "/Observation" : {
      "post" : {
        "operationId" : "createObservation",
        "summary" : "Cria um novo Observation (interação create)",
        "tags" : [ "Observation" ],
        "responses" : {
          "201" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Observation em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      },
      "get" : {
        "operationId" : "searchObservation",
        "summary" : "Busca recursos Observation por parâmetros (interação search-type)",
        "tags" : [ "Observation" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/Observation/{id}" : {
      "get" : {
        "operationId" : "readObservation",
        "summary" : "Lê o Observation corrente pelo id (interação read)",
        "tags" : [ "Observation" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Observation",
          "schema" : {
            "type" : "string"
          }
        } ]
      },
      "put" : {
        "operationId" : "updateObservation",
        "summary" : "Atualiza (ou cria com id conhecido) o Observation (interação update)",
        "tags" : [ "Observation" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Observation",
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Observation em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      }
    },
    "/Observation/{id}/_history/{vid}" : {
      "get" : {
        "operationId" : "vreadObservation",
        "summary" : "Lê uma versão específica do Observation (interação vread)",
        "tags" : [ "Observation" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Observation",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "vid",
          "in" : "path",
          "required" : true,
          "description" : "Id da versão do recurso Observation",
          "schema" : {
            "type" : "string"
          }
        } ]
      }
    },
    "/Patient" : {
      "post" : {
        "operationId" : "createPatient",
        "summary" : "Cria um novo Patient (interação create)",
        "tags" : [ "Patient" ],
        "responses" : {
          "201" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Patient em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      },
      "get" : {
        "operationId" : "searchPatient",
        "summary" : "Busca recursos Patient por parâmetros (interação search-type)",
        "tags" : [ "Patient" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/Patient/_history" : {
      "get" : {
        "operationId" : "historyTypePatient",
        "summary" : "Histórico do tipo Patient (interação history-type)",
        "tags" : [ "Patient" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/Patient/{id}" : {
      "delete" : {
        "operationId" : "deletePatient",
        "summary" : "Remove o Patient (interação delete)",
        "tags" : [ "Patient" ],
        "responses" : {
          "204" : {
            "description" : "Recurso removido"
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Patient",
          "schema" : {
            "type" : "string"
          }
        } ]
      },
      "patch" : {
        "operationId" : "patchPatient",
        "summary" : "Aplica alteração parcial ao Patient (interação patch)",
        "tags" : [ "Patient" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Patient",
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Patient em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      },
      "get" : {
        "operationId" : "readPatient",
        "summary" : "Lê o Patient corrente pelo id (interação read)",
        "tags" : [ "Patient" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Patient",
          "schema" : {
            "type" : "string"
          }
        } ]
      },
      "put" : {
        "operationId" : "updatePatient",
        "summary" : "Atualiza (ou cria com id conhecido) o Patient (interação update)",
        "tags" : [ "Patient" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Patient",
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Patient em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      }
    },
    "/Patient/{id}/_history" : {
      "get" : {
        "operationId" : "historyInstancePatient",
        "summary" : "Histórico de uma instância de Patient (interação history-instance)",
        "tags" : [ "Patient" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Patient",
          "schema" : {
            "type" : "string"
          }
        } ]
      }
    },
    "/Patient/{id}/_history/{vid}" : {
      "get" : {
        "operationId" : "vreadPatient",
        "summary" : "Lê uma versão específica do Patient (interação vread)",
        "tags" : [ "Patient" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Patient",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "vid",
          "in" : "path",
          "required" : true,
          "description" : "Id da versão do recurso Patient",
          "schema" : {
            "type" : "string"
          }
        } ]
      }
    },
    "/Procedure" : {
      "post" : {
        "operationId" : "createProcedure",
        "summary" : "Cria um novo Procedure (interação create)",
        "tags" : [ "Procedure" ],
        "responses" : {
          "201" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Procedure em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      },
      "get" : {
        "operationId" : "searchProcedure",
        "summary" : "Busca recursos Procedure por parâmetros (interação search-type)",
        "tags" : [ "Procedure" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/Procedure/{id}" : {
      "get" : {
        "operationId" : "readProcedure",
        "summary" : "Lê o Procedure corrente pelo id (interação read)",
        "tags" : [ "Procedure" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Procedure",
          "schema" : {
            "type" : "string"
          }
        } ]
      },
      "put" : {
        "operationId" : "updateProcedure",
        "summary" : "Atualiza (ou cria com id conhecido) o Procedure (interação update)",
        "tags" : [ "Procedure" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Procedure",
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Procedure em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      }
    },
    "/Subscription" : {
      "post" : {
        "operationId" : "createSubscription",
        "summary" : "Cria um novo Subscription (interação create)",
        "tags" : [ "Subscription" ],
        "responses" : {
          "201" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Subscription em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      },
      "get" : {
        "operationId" : "searchSubscription",
        "summary" : "Busca recursos Subscription por parâmetros (interação search-type)",
        "tags" : [ "Subscription" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/Subscription/{id}" : {
      "delete" : {
        "operationId" : "deleteSubscription",
        "summary" : "Remove o Subscription (interação delete)",
        "tags" : [ "Subscription" ],
        "responses" : {
          "204" : {
            "description" : "Recurso removido"
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Subscription",
          "schema" : {
            "type" : "string"
          }
        } ]
      },
      "get" : {
        "operationId" : "readSubscription",
        "summary" : "Lê o Subscription corrente pelo id (interação read)",
        "tags" : [ "Subscription" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Subscription",
          "schema" : {
            "type" : "string"
          }
        } ]
      },
      "put" : {
        "operationId" : "updateSubscription",
        "summary" : "Atualiza (ou cria com id conhecido) o Subscription (interação update)",
        "tags" : [ "Subscription" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Subscription",
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "required" : true,
          "description" : "Recurso Subscription em JSON FHIR R4",
          "content" : {
            "application/fhir+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RecursoFhir"
              }
            }
          }
        }
      }
    },
    "/Task" : {
      "get" : {
        "operationId" : "searchTask",
        "summary" : "Busca recursos Task por parâmetros (interação search-type)",
        "tags" : [ "Task" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Bundle"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        }
      }
    },
    "/Task/{id}" : {
      "get" : {
        "operationId" : "readTask",
        "summary" : "Lê o Task corrente pelo id (interação read)",
        "tags" : [ "Task" ],
        "responses" : {
          "200" : {
            "description" : "Sucesso",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RecursoFhir"
                }
              }
            }
          },
          "default" : {
            "description" : "Erro — detalhes em um OperationOutcome",
            "content" : {
              "application/fhir+json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationOutcome"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "description" : "Id lógico do recurso Task",
          "schema" : {
            "type" : "string"
          }
        } ]
      }
    }
  },
  "components" : {
    "schemas" : {
      "RecursoFhir" : {
        "type" : "object",
        "description" : "Recurso FHIR R4 em JSON. A estrutura normativa é definida pelos StructureDefinitions dos IGs do HubSaúde.",
        "required" : [ "resourceType" ],
        "properties" : {
          "resourceType" : {
            "type" : "string"
          }
        },
        "additionalProperties" : true
      },
      "Bundle" : {
        "type" : "object",
        "description" : "Bundle FHIR R4 (resultados de search e history).",
        "required" : [ "resourceType" ],
        "properties" : {
          "resourceType" : {
            "type" : "string"
          }
        },
        "additionalProperties" : true
      },
      "OperationOutcome" : {
        "type" : "object",
        "description" : "OperationOutcome FHIR R4 com detalhes do erro.",
        "required" : [ "resourceType" ],
        "properties" : {
          "resourceType" : {
            "type" : "string"
          }
        },
        "additionalProperties" : true
      },
      "CapabilityStatement" : {
        "type" : "object",
        "description" : "CapabilityStatement FHIR R4 — o contrato normativo.",
        "required" : [ "resourceType" ],
        "properties" : {
          "resourceType" : {
            "type" : "string"
          }
        },
        "additionalProperties" : true
      }
    }
  },
  "x-hubsaude" : {
    "derivadoDe" : "hubsaude-capabilities#0.3.15",
    "normativo" : false,
    "aviso" : "ATENÇÃO: documento DERIVADO e NÃO-NORMATIVO. O contrato FHIR normativo do HubSaúde é o conjunto de CapabilityStatements publicado no FHIR NPM Package hubsaude-capabilities (.tgz), aplicado pelo gateway em runtime. Este OpenAPI é regenerado a cada build a partir desses CapabilityStatements para uso por ferramentas do ecossistema OpenAPI. Em caso de divergência, prevalece o CapabilityStatement.",
    "fontes" : [ {
      "url" : "https://hubsaude.go.gov.br/fhir/CapabilityStatement/hubsaude-core",
      "version" : "1.2.1",
      "origem" : "hubsaude-capabilities#0.3.15"
    } ]
  }
}
