Files
HospitalAssistantBackend/src/apps/users/v1/schema.py
Miwory 2cb25e817c
Some checks failed
Build And Push / publish (push) Failing after 55s
Добавлено конвертирование xml результата в pdf
2026-04-15 15:14:24 +03:00

62 lines
1.1 KiB
Python

from pydantic_xml import BaseXmlModel, attr, element
from typing import TypedDict
from pydantic import BaseModel
class AEMDFile(TypedDict):
emdrId: str
localUid: str
registrationDate: str
registrationDateTime: str
storeTillDate: str
DocKind: str
IsSemd: bool
class AEMDReturnFile(TypedDict):
emdrId: str
registrationDate: str
DocKind: str
IsSemd: bool
isCached: bool
class AEMDDemandContent(TypedDict):
messageId: str
emdrId: str
vitaId: str
class Notifications(TypedDict):
notifications: list[dict[str, str | bool]]
class Complaints(BaseModel):
complaints: str
NS = 'urn:hl7-org:v3'
class TextElement(BaseXmlModel, tag='text', ns=NS):
representation: str = attr()
media_type: str = attr(name='mediaType')
content: str
class NonXMLBody(BaseXmlModel, tag='nonXMLBody', ns=NS):
text: TextElement = element()
class Component(BaseXmlModel, tag='component', ns=NS):
non_xml_body: NonXMLBody = element(tag='nonXMLBody')
class ClinicalDocument(BaseXmlModel, tag='ClinicalDocument', ns=NS):
component: Component = element()
class DownloadFile(BaseModel):
link: str