#![allow(
clippy::all,
clippy::pedantic,
clippy::nursery,
dead_code,
unused_variables,
reason = "mechanically generated contract text: the OAS is emitted in full (every DTO, param struct and route, whether or not this workspace consumes it yet), so style and dead-code lints do not apply — the hand-written runtime and the implementing adapter carry the lint bar"
)]
#![expect(
clippy::disallowed_types,
reason = "adjudicated free-form JSON slots: serde_json::Value is workspace-banned (#1694); a generated carrier exists only where the spec leaves the slot open, and each adjudicated field's NOTE names its citation"
)]
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VersionOfComposition {
#[serde(skip_serializing_if = "Option::is_none")]
pub _type: Option<String>,
pub contribution: openehr_base::prelude::ObjectRef,
#[serde(skip_serializing_if = "Option::is_none")]
pub signature: Option<String>,
pub commit_audit: openehr_rm::prelude::AuditDetails,
pub data: openehr_rm::prelude::Composition,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VersionOfEhrStatus {
#[serde(skip_serializing_if = "Option::is_none")]
pub _type: Option<String>,
pub contribution: openehr_base::prelude::ObjectRef,
#[serde(skip_serializing_if = "Option::is_none")]
pub signature: Option<String>,
pub commit_audit: openehr_rm::prelude::AuditDetails,
pub data: openehr_rm::prelude::EhrStatus,
}
#[derive(Debug, Clone)]
pub enum Versionable {
Composition(openehr_rm::prelude::Composition),
EhrStatus(openehr_rm::prelude::EhrStatus),
Folder(openehr_rm::prelude::Folder),
}
impl ::serde::Serialize for Versionable {
fn serialize<__S: ::serde::Serializer>(
&self,
__serializer: __S,
) -> ::core::result::Result<__S::Ok, __S::Error> {
match self {
Self::Composition(__x) => ::serde::Serialize::serialize(__x, __serializer),
Self::EhrStatus(__x) => ::serde::Serialize::serialize(__x, __serializer),
Self::Folder(__x) => ::serde::Serialize::serialize(__x, __serializer),
}
}
}
impl<'de> ::serde::Deserialize<'de> for Versionable {
fn deserialize<__D: ::serde::Deserializer<'de>>(
__deserializer: __D,
) -> ::core::result::Result<Self, __D::Error> {
const __TAGS: &[&str] = &["COMPOSITION", "EHR_STATUS", "FOLDER"];
struct __Visitor;
impl<'de> ::serde::de::Visitor<'de> for __Visitor {
type Value = Versionable;
fn expecting(&self, __f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
__f.write_str("an ITS-REST `Versionable` object")
}
fn visit_map<__A: ::serde::de::MapAccess<'de>>(
self,
mut __map: __A,
) -> ::core::result::Result<Self::Value, __A::Error> {
let (__tag, __buffered) =
::openehr_base::serde_support::read_slot_tag(&mut __map, __TAGS)?;
match __tag {
Some(::openehr_base::serde_support::TagMatch::Known(__t)) => {
let __rest = ::openehr_base::serde_support::TaggedRest::new(
Some(__t),
__buffered,
__map,
);
match __t {
"COMPOSITION" => ::core::result::Result::Ok(Versionable::Composition(
::serde::Deserialize::deserialize(__rest)?,
)),
"EHR_STATUS" => ::core::result::Result::Ok(Versionable::EhrStatus(
::serde::Deserialize::deserialize(__rest)?,
)),
"FOLDER" => ::core::result::Result::Ok(Versionable::Folder(
::serde::Deserialize::deserialize(__rest)?,
)),
__other => ::core::result::Result::Err(
::openehr_base::serde_support::unexpected_type(
"Versionable",
__other,
"COMPOSITION, EHR_STATUS, FOLDER",
),
),
}
}
Some(::openehr_base::serde_support::TagMatch::Unknown(__other)) => {
::core::result::Result::Err(::openehr_base::serde_support::unexpected_type(
"Versionable",
&__other,
"COMPOSITION, EHR_STATUS, FOLDER",
))
}
None => {
::core::result::Result::Err(::openehr_base::serde_support::missing_type(
"Versionable",
"COMPOSITION, EHR_STATUS, FOLDER",
))
}
}
}
}
::serde::Deserializer::deserialize_map(__deserializer, __Visitor)
}
}
pub type UpdateVersion = super::common::UpdateVersion<Versionable>;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NewContribution {
#[serde(skip_serializing_if = "Option::is_none")]
pub uid: Option<openehr_base::prelude::HierObjectId>,
pub versions: Vec<UpdateVersion>,
pub audit: super::common::UpdateAudit,
}
pub type ItemTagOfComposition = openehr_rm::prelude::ItemTag;
pub type ItemTagOfEhrStatus = openehr_rm::prelude::ItemTag;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EhrGetBySubjectParams {
pub subject_id: String,
pub subject_namespace: String,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EhrCreateParams {
#[serde(rename = "Prefer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefer: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EhrGetByIdParams {
pub ehr_id: String,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EhrCreateWithIdParams {
pub ehr_id: String,
#[serde(rename = "Prefer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefer: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EhrStatusGetByVersionIdParams {
pub ehr_id: String,
pub version_uid: String,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EhrStatusGetAtTimeParams {
pub ehr_id: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub version_at_time: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EhrStatusUpdateParams {
pub ehr_id: String,
#[serde(rename = "If-Match")]
pub if_match: String,
#[serde(rename = "Prefer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefer: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
#[serde(rename = "openehr-item-tag")]
#[serde(skip_serializing_if = "Option::is_none")]
pub openehr_item_tag: Option<Vec<String>>,
#[serde(rename = "openehr-version-item-tag")]
#[serde(skip_serializing_if = "Option::is_none")]
pub openehr_version_item_tag: Option<Vec<String>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VersionedEhrStatusGetParams {
pub ehr_id: String,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VersionedEhrStatusRevisionHistoryParams {
pub ehr_id: String,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VersionedEhrStatusVersionGetAtTimeParams {
pub ehr_id: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub version_at_time: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VersionedEhrStatusVersionGetByIdParams {
pub ehr_id: String,
pub version_uid: String,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CompositionCreateParams {
pub ehr_id: String,
#[serde(rename = "Prefer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefer: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
#[serde(rename = "openehr-item-tag")]
#[serde(skip_serializing_if = "Option::is_none")]
pub openehr_item_tag: Option<Vec<String>>,
#[serde(rename = "openehr-version-item-tag")]
#[serde(skip_serializing_if = "Option::is_none")]
pub openehr_version_item_tag: Option<Vec<String>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CompositionGetParams {
pub ehr_id: String,
pub uid_based_id: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub version_at_time: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CompositionUpdateParams {
pub ehr_id: String,
pub uid_based_id: String,
#[serde(rename = "If-Match")]
pub if_match: String,
#[serde(rename = "Prefer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefer: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
#[serde(rename = "openehr-item-tag")]
#[serde(skip_serializing_if = "Option::is_none")]
pub openehr_item_tag: Option<Vec<String>>,
#[serde(rename = "openehr-version-item-tag")]
#[serde(skip_serializing_if = "Option::is_none")]
pub openehr_version_item_tag: Option<Vec<String>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CompositionDeleteParams {
pub ehr_id: String,
pub uid_based_id: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VersionedCompositionGetParams {
pub ehr_id: String,
pub versioned_object_uid: String,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VersionedCompositionRevisionHistoryParams {
pub ehr_id: String,
pub versioned_object_uid: String,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VersionedCompositionVersionGetAtTimeParams {
pub ehr_id: String,
pub versioned_object_uid: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub version_at_time: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VersionedCompositionVersionGetByIdParams {
pub ehr_id: String,
pub versioned_object_uid: String,
pub version_uid: String,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DirectoryGetAtTimeParams {
pub ehr_id: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub version_at_time: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DirectoryUpdateParams {
pub ehr_id: String,
#[serde(rename = "If-Match")]
pub if_match: String,
#[serde(rename = "Prefer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefer: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DirectoryCreateParams {
pub ehr_id: String,
#[serde(rename = "Prefer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefer: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DirectoryDeleteParams {
pub ehr_id: String,
#[serde(rename = "If-Match")]
pub if_match: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DirectoryGetByVersionIdParams {
pub ehr_id: String,
pub version_uid: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ContributionCreateParams {
pub ehr_id: String,
#[serde(rename = "Prefer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefer: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ContributionGetParams {
pub ehr_id: String,
pub contribution_uid: String,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EhrTagsGetParams {
pub ehr_id: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub tag_key: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub tag_value: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub tag_target_path: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CompositionTagsGetParams {
pub ehr_id: String,
pub uid_based_id: String,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CompositionTagsUpdateParams {
pub ehr_id: String,
pub uid_based_id: String,
#[serde(rename = "Prefer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefer: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CompositionTagsDeleteParams {
pub ehr_id: String,
pub uid_based_id: String,
pub key: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EhrStatusTagsGetParams {
pub ehr_id: String,
pub uid_based_id: String,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EhrStatusTagsUpdateParams {
pub ehr_id: String,
pub uid_based_id: String,
#[serde(rename = "Prefer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefer: Option<String>,
#[serde(rename = "Accept")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept: Option<String>,
#[serde(rename = "Content-Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EhrStatusTagsDeleteParams {
pub ehr_id: String,
pub uid_based_id: String,
pub key: String,
}
#[async_trait::async_trait]
pub trait EhrApi {
async fn ehr_get_by_subject(
&self,
params: EhrGetBySubjectParams,
) -> Result<openehr_rm::prelude::Ehr, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn ehr_create(
&self,
params: EhrCreateParams,
body: Option<openehr_rm::prelude::EhrStatus>,
) -> Result<serde_json::Value, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn ehr_get_by_id(
&self,
params: EhrGetByIdParams,
) -> Result<openehr_rm::prelude::Ehr, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn ehr_create_with_id(
&self,
params: EhrCreateWithIdParams,
body: Option<openehr_rm::prelude::EhrStatus>,
) -> Result<serde_json::Value, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn ehr_status_get_by_version_id(
&self,
params: EhrStatusGetByVersionIdParams,
) -> Result<openehr_rm::prelude::EhrStatus, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn ehr_status_get_at_time(
&self,
params: EhrStatusGetAtTimeParams,
) -> Result<openehr_rm::prelude::EhrStatus, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn ehr_status_update(
&self,
params: EhrStatusUpdateParams,
body: openehr_rm::prelude::EhrStatus,
) -> Result<serde_json::Value, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn versioned_ehr_status_get(
&self,
params: VersionedEhrStatusGetParams,
) -> Result<openehr_rm::prelude::VersionedEhrStatus, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn versioned_ehr_status_revision_history(
&self,
params: VersionedEhrStatusRevisionHistoryParams,
) -> Result<openehr_rm::prelude::RevisionHistory, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn versioned_ehr_status_version_get_at_time(
&self,
params: VersionedEhrStatusVersionGetAtTimeParams,
) -> Result<VersionOfEhrStatus, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn versioned_ehr_status_version_get_by_id(
&self,
params: VersionedEhrStatusVersionGetByIdParams,
) -> Result<VersionOfEhrStatus, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn composition_create(
&self,
params: CompositionCreateParams,
body: openehr_rm::prelude::Composition,
) -> Result<serde_json::Value, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn composition_get(
&self,
params: CompositionGetParams,
) -> Result<openehr_rm::prelude::Composition, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn composition_update(
&self,
params: CompositionUpdateParams,
body: openehr_rm::prelude::Composition,
) -> Result<serde_json::Value, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn composition_delete(
&self,
params: CompositionDeleteParams,
) -> Result<(), crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn versioned_composition_get(
&self,
params: VersionedCompositionGetParams,
) -> Result<openehr_rm::prelude::VersionedComposition, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn versioned_composition_revision_history(
&self,
params: VersionedCompositionRevisionHistoryParams,
) -> Result<openehr_rm::prelude::RevisionHistory, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn versioned_composition_version_get_at_time(
&self,
params: VersionedCompositionVersionGetAtTimeParams,
) -> Result<VersionOfComposition, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn versioned_composition_version_get_by_id(
&self,
params: VersionedCompositionVersionGetByIdParams,
) -> Result<VersionOfComposition, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn directory_get_at_time(
&self,
params: DirectoryGetAtTimeParams,
) -> Result<openehr_rm::prelude::Folder, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn directory_update(
&self,
params: DirectoryUpdateParams,
body: openehr_rm::prelude::Folder,
) -> Result<serde_json::Value, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn directory_create(
&self,
params: DirectoryCreateParams,
body: openehr_rm::prelude::Folder,
) -> Result<serde_json::Value, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn directory_delete(
&self,
params: DirectoryDeleteParams,
) -> Result<(), crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn directory_get_by_version_id(
&self,
params: DirectoryGetByVersionIdParams,
) -> Result<openehr_rm::prelude::Folder, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn contribution_create(
&self,
params: ContributionCreateParams,
body: NewContribution,
) -> Result<serde_json::Value, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn contribution_get(
&self,
params: ContributionGetParams,
) -> Result<openehr_rm::prelude::Contribution, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn ehr_tags_get(
&self,
params: EhrTagsGetParams,
) -> Result<Vec<ItemTagOfComposition>, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn composition_tags_get(
&self,
params: CompositionTagsGetParams,
) -> Result<Vec<ItemTagOfComposition>, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn composition_tags_update(
&self,
params: CompositionTagsUpdateParams,
body: Vec<super::common::UpdateItemTag>,
) -> Result<Vec<ItemTagOfComposition>, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn composition_tags_delete(
&self,
params: CompositionTagsDeleteParams,
) -> Result<(), crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn ehr_status_tags_get(
&self,
params: EhrStatusTagsGetParams,
) -> Result<Vec<ItemTagOfEhrStatus>, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn ehr_status_tags_update(
&self,
params: EhrStatusTagsUpdateParams,
body: Vec<super::common::UpdateItemTag>,
) -> Result<Vec<ItemTagOfEhrStatus>, crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
async fn ehr_status_tags_delete(
&self,
params: EhrStatusTagsDeleteParams,
) -> Result<(), crate::rest::runtime::ApiError> {
Err(crate::rest::runtime::ApiError::NotImplemented)
}
}
pub const ROUTES: &[(&str, &str, &str)] = &[
("GET", "/ehr", "ehr_get_by_subject"),
("POST", "/ehr", "ehr_create"),
("GET", "/ehr/{ehr_id}", "ehr_get_by_id"),
("PUT", "/ehr/{ehr_id}", "ehr_create_with_id"),
(
"GET",
"/ehr/{ehr_id}/ehr_status/{version_uid}",
"ehr_status_get_by_version_id",
),
("GET", "/ehr/{ehr_id}/ehr_status", "ehr_status_get_at_time"),
("PUT", "/ehr/{ehr_id}/ehr_status", "ehr_status_update"),
(
"GET",
"/ehr/{ehr_id}/versioned_ehr_status",
"versioned_ehr_status_get",
),
(
"GET",
"/ehr/{ehr_id}/versioned_ehr_status/revision_history",
"versioned_ehr_status_revision_history",
),
(
"GET",
"/ehr/{ehr_id}/versioned_ehr_status/version",
"versioned_ehr_status_version_get_at_time",
),
(
"GET",
"/ehr/{ehr_id}/versioned_ehr_status/version/{version_uid}",
"versioned_ehr_status_version_get_by_id",
),
("POST", "/ehr/{ehr_id}/composition", "composition_create"),
(
"GET",
"/ehr/{ehr_id}/composition/{uid_based_id}",
"composition_get",
),
(
"PUT",
"/ehr/{ehr_id}/composition/{uid_based_id}",
"composition_update",
),
(
"DELETE",
"/ehr/{ehr_id}/composition/{uid_based_id}",
"composition_delete",
),
(
"GET",
"/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}",
"versioned_composition_get",
),
(
"GET",
"/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/revision_history",
"versioned_composition_revision_history",
),
(
"GET",
"/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version",
"versioned_composition_version_get_at_time",
),
(
"GET",
"/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version/{version_uid}",
"versioned_composition_version_get_by_id",
),
("GET", "/ehr/{ehr_id}/directory", "directory_get_at_time"),
("PUT", "/ehr/{ehr_id}/directory", "directory_update"),
("POST", "/ehr/{ehr_id}/directory", "directory_create"),
("DELETE", "/ehr/{ehr_id}/directory", "directory_delete"),
(
"GET",
"/ehr/{ehr_id}/directory/{version_uid}",
"directory_get_by_version_id",
),
("POST", "/ehr/{ehr_id}/contribution", "contribution_create"),
(
"GET",
"/ehr/{ehr_id}/contribution/{contribution_uid}",
"contribution_get",
),
("GET", "/ehr/{ehr_id}/tags", "ehr_tags_get"),
(
"GET",
"/ehr/{ehr_id}/composition/{uid_based_id}/tags",
"composition_tags_get",
),
(
"PUT",
"/ehr/{ehr_id}/composition/{uid_based_id}/tags",
"composition_tags_update",
),
(
"DELETE",
"/ehr/{ehr_id}/composition/{uid_based_id}/tags/{key}",
"composition_tags_delete",
),
(
"GET",
"/ehr/{ehr_id}/ehr_status/{uid_based_id}/tags",
"ehr_status_tags_get",
),
(
"PUT",
"/ehr/{ehr_id}/ehr_status/{uid_based_id}/tags",
"ehr_status_tags_update",
),
(
"DELETE",
"/ehr/{ehr_id}/ehr_status/{uid_based_id}/tags/{key}",
"ehr_status_tags_delete",
),
];