Skip to content

http ​

go
import "github.com/prescriptoo/prescriptoo-api/services/doctor/internal/presentation/http"

Package http exposes the doctor service through validated Huma API contracts.

Index ​

func RegisterDoctorChiefComplaintList ​

go
func RegisterDoctorChiefComplaintList(api huma.API, uc usecase.ClinicalListChiefComplaintUseCase)

RegisterDoctorChiefComplaintList preserves the working route and adds cursor pagination.

func RegisterDoctorFinalPrescriptions ​

go
func RegisterDoctorFinalPrescriptions(a huma.API, uc usecase.FinalPrescriptionUseCases)

RegisterDoctorFinalPrescriptions registers real final-save/read contracts; no mocked success is returned.

func RegisterDoctorHistorySuggestionList ​

go
func RegisterDoctorHistorySuggestionList(api huma.API, uc usecase.ClinicalListHistorySuggestionUseCase)

RegisterDoctorHistorySuggestionList preserves the working route and adds cursor pagination.

func RegisterDoctorPadSettings ​

go
func RegisterDoctorPadSettings(a huma.API, get usecase.GetPadSettingsUseCase, save usecase.SavePadSettingsUseCase)

RegisterDoctorPadSettings registers the account-level pad design operations.

func RegisterDoctorPadSuggestions ​

go
func RegisterDoctorPadSuggestions(a huma.API, verify *usecase.VerifyAuthUseCase)

RegisterDoctorPadSuggestions registers mock-only read contracts. Mock data and mapping stay in HTTP handlers. Existing chief complaint and history APIs retain their real implementations.

func RegisterProfessionalCatalogs ​

go
func RegisterProfessionalCatalogs(api huma.API, catalogs doctor.CatalogReader, selections *usecase.SelectProfessionalDetails)

RegisterProfessionalCatalogs exposes reference choices and the doctor's own selections.

type AuthHandler ​

AuthHandler delivers doctor login and session verification.

go
type AuthHandler struct {
    // contains filtered or unexported fields
}

func NewAuthHandler ​

go
func NewAuthHandler(login *usecase.LoginUseCase, verifyAuth *usecase.VerifyAuthUseCase) *AuthHandler

NewAuthHandler constructs doctor authentication handlers.

func (*AuthHandler) RegisterHuma ​

go
func (h *AuthHandler) RegisterHuma(api huma.API)

RegisterHuma registers implemented doctor authentication contracts.

type AuthenticatedInput ​

AuthenticatedInput carries documented bearer credentials; TODO stubs do not enforce authentication.

go
type AuthenticatedInput struct {
    Authorization string `header:"Authorization" hidden:"true"`
}

type AuthenticatedReqDto ​

AuthenticatedReqDto carries the bearer header separately from body data.

go
type AuthenticatedReqDto struct {
    Authorization string `header:"Authorization" hidden:"true"`
}

type ClinicalSummaryHistorySourceDto ​

ClinicalSummaryHistorySourceDto identifies the single finalized assessment supplying history and allergy state.

go
type ClinicalSummaryHistorySourceDto struct {
    PrescriptionID string    `json:"prescription_id"`
    RecordedAt     time.Time `json:"recorded_at"`
}

type ClinicalSummaryLabDto ​

ClinicalSummaryLabDto documents the deferred external lab shape without synthesizing results.

go
type ClinicalSummaryLabDto struct {
    ID             string  `json:"id"`
    TestName       string  `json:"test_name"`
    Value          string  `json:"value"`
    Unit           *string `json:"unit" nullable:"true"`
    Date           string  `json:"date"`
    ReferenceRange *string `json:"reference_range" nullable:"true"`
    Flag           *string `json:"flag" nullable:"true" enum:"high,low,normal"`
}

type ClinicalSummaryObservationDto ​

ClinicalSummaryObservationDto retains a recorded textual examination and its source timestamp.

go
type ClinicalSummaryObservationDto struct {
    ID         string    `json:"id"`
    Type       string    `json:"type"`
    Label      string    `json:"label"`
    Value      string    `json:"value"`
    Unit       string    `json:"unit"`
    RecordedAt time.Time `json:"recorded_at"`
}

type ClinicalSummaryPendingInvestigationDto ​

ClinicalSummaryPendingInvestigationDto requires an authoritative order lifecycle, currently unavailable.

go
type ClinicalSummaryPendingInvestigationDto struct {
    ID          string    `json:"id"`
    Title       string    `json:"title"`
    Details     string    `json:"details"`
    RequestedAt time.Time `json:"requested_at"`
}

type ClinicalSummaryPrescriptionDto ​

ClinicalSummaryPrescriptionDto is a historical saved-document reference.

go
type ClinicalSummaryPrescriptionDto struct {
    ID               string `json:"id"`
    ConsultationDate string `json:"consultation_date"`
    DoctorName       string `json:"doctor_name"`
    Summary          string `json:"summary"`
    Version          int64  `json:"version"`
}

type ClinicalSummaryVisitDto ​

ClinicalSummaryVisitDto is derived from an actual finalized document; it is not an appointment.

go
type ClinicalSummaryVisitDto struct {
    ID                 string `json:"id"`
    Date               string `json:"date"`
    DoctorName         string `json:"doctor_name"`
    Diagnosis          string `json:"diagnosis"`
    VitalsSummary      string `json:"vitals_summary"`
    Summary            string `json:"summary"`
    MedicationsSummary string `json:"medications_summary"`
}

type CreatePatientBodyDto ​

CreatePatientBodyDto contains only client-editable registration fields.

go
type CreatePatientBodyDto struct {
    OrganizationID string  `json:"organization_id" format:"uuid"`
    Name           string  `json:"name" minLength:"1" maxLength:"255" pattern:"\\S"`
    Email          *string `json:"email,omitempty" nullable:"true" maxLength:"255"`
    types.Demographics
}

type CreatePatientReqDto ​

CreatePatientReqDto maps the creation headers and body.

go
type CreatePatientReqDto struct {
    AuthenticatedReqDto
    IdempotencyKey string `header:"Idempotency-Key" required:"true" minLength:"1" maxLength:"128"`
    Body           CreatePatientBodyDto
    RawBody        []byte
}

func (*CreatePatientReqDto) Resolve ​

go
func (in *CreatePatientReqDto) Resolve(_ huma.Context) []error

Resolve checks request-local contradictions before invoking service capabilities.

type CreatePatientResDto ​

CreatePatientResDto wraps a created patient in the common success envelope.

go
type CreatePatientResDto struct {
    Body types.SuccessResponse[types.Patient]
}

type CreateRequestInput ​

CreateRequestInput identifies the organization the doctor wants to join.

go
type CreateRequestInput struct {
    AuthenticatedInput
    Body usecase.CreateJoinRequestParams
}

type DoctorAdviceGroupListItemDto ​

DoctorAdviceGroupListItemDto is a read-only mock group that carries its complete advice membership.

go
type DoctorAdviceGroupListItemDto struct {
    ID      string                    `json:"id"`
    Label   string                    `json:"label"`
    Aliases []string                  `json:"aliases" nullable:"false"`
    Advices []DoctorAdviceListItemDto `json:"advices" nullable:"false"`
}

type DoctorAdviceGroupListReqDto ​

DoctorAdviceGroupListReqDto requires an explicit language; another language is never substituted.

go
type DoctorAdviceGroupListReqDto struct {
    DoctorSuggestionQueryReqDto
    Language string `query:"language" required:"true" enum:"bn,en"`
}

type DoctorAdviceGroupListResDto ​

DoctorAdviceGroupListResDto wraps a mock advice group page in the shared cursor envelope.

go
type DoctorAdviceGroupListResDto struct {
    Body types.CursorResponse[DoctorAdviceGroupListItemDto]
}

type DoctorAdviceListItemDto ​

DoctorAdviceListItemDto is editable catalogue text, not a patient-specific recommendation.

go
type DoctorAdviceListItemDto struct {
    ID      string   `json:"id"`
    Text    string   `json:"text"`
    Aliases []string `json:"aliases" nullable:"false"`
}

type DoctorAdviceListReqDto ​

DoctorAdviceListReqDto requires an explicit language; another language is never substituted.

go
type DoctorAdviceListReqDto struct {
    DoctorSuggestionQueryReqDto
    Language string `query:"language" required:"true" enum:"bn,en"`
}

type DoctorAdviceListResDto ​

DoctorAdviceListResDto wraps a mock advice page in the shared cursor envelope.

go
type DoctorAdviceListResDto struct {
    Body types.CursorResponse[DoctorAdviceListItemDto]
}

type DoctorAuthVerifyDataDto ​

DoctorAuthVerifyDataDto contains safe, current account and professional details.

go
type DoctorAuthVerifyDataDto struct {
    Identity identitypublic.Account `json:"identity"`
    Doctor   doctorpublic.Profile   `json:"doctor"`
}

type DoctorAuthVerifyReqDto ​

DoctorAuthVerifyReqDto carries the credentials to verify doctor access.

go
type DoctorAuthVerifyReqDto struct {
    Authorization string `header:"Authorization" hidden:"true"`
}

type DoctorAuthVerifyResDto ​

DoctorAuthVerifyResDto wraps the verified identity and doctor profile.

go
type DoctorAuthVerifyResDto struct {
    Body types.SuccessResponse[DoctorAuthVerifyDataDto]
}

type DoctorChiefComplaintListBodyDto ​

DoctorChiefComplaintListBodyDto retains the legacy envelope and includes cursor pagination for authenticated catalogue reads.

go
type DoctorChiefComplaintListBodyDto struct {
    Message    string                            `json:"message"`
    StatusCode int                               `json:"status_code"`
    Data       []DoctorChiefComplaintListItemDto `json:"data" nullable:"false"`
    Pagination types.CursorPagination            `json:"pagination,omitempty"`
}

type DoctorChiefComplaintListItemDto ​

DoctorChiefComplaintListItemDto contains one choice with all selection metadata inline.

go
type DoctorChiefComplaintListItemDto struct {
    ID  string `json:"id" format:"uuid"`
    // Title is the English display label.
    Title string `json:"title" doc:"Title is the English display label."`
    // Aliases includes Bengali and English synonyms and is never null.
    Aliases []string `json:"aliases" nullable:"false" doc:"Aliases includes Bengali and English synonyms and is never null."`
    // Associated contains optional related complaint choices in display order.
    Associated []string `json:"associated" nullable:"false" doc:"Associated contains optional related complaint choices in display order."`
}

type DoctorChiefComplaintListReqDto ​

DoctorChiefComplaintListReqDto defines the bounded, authenticated autocomplete request.

go
type DoctorChiefComplaintListReqDto struct {
    Cursor        string `query:"cursor" maxLength:"8192"` // Authorization carries the active doctor bearer session.
    Authorization string `header:"Authorization" hidden:"true"`
    // Search matches normalized English titles and aliases, including Bengali; blank returns defaults.
    Search string `query:"search" maxLength:"255" doc:"Search matches normalized English titles and aliases, including Bengali; blank returns defaults."`
    // Limit defaults to 10 and accepts 1-100.
    Limit int `query:"limit" default:"10" minimum:"1" maximum:"100" doc:"Limit defaults to 10 and accepts 1-100."`
}

type DoctorChiefComplaintListResDto ​

DoctorChiefComplaintListResDto wraps real catalogue choices.

go
type DoctorChiefComplaintListResDto struct {
    Body DoctorChiefComplaintListBodyDto
}

type DoctorClinicalSuggestionQueryReqDto ​

DoctorClinicalSuggestionQueryReqDto uses the clinical autocomplete page size of ten.

go
type DoctorClinicalSuggestionQueryReqDto struct {
    AuthenticatedReqDto
    Search string `query:"search" maxLength:"255"`
    Cursor string `query:"cursor" maxLength:"8192"`
    Limit  int    `query:"limit" default:"10" minimum:"1" maximum:"100"`
}

type DoctorDiagnosisSuggestionListItemDto ​

DoctorDiagnosisSuggestionListItemDto contains a catalogue example, never a patient finding.

go
type DoctorDiagnosisSuggestionListItemDto struct {
    ID      string   `json:"id"`
    Title   string   `json:"title"`
    Aliases []string `json:"aliases" nullable:"false"`
}

type DoctorDiagnosisSuggestionListReqDto ​

DoctorDiagnosisSuggestionListReqDto selects account-authenticated mock choices.

go
type DoctorDiagnosisSuggestionListReqDto struct {
    DoctorClinicalSuggestionQueryReqDto
}

type DoctorDiagnosisSuggestionListResDto ​

DoctorDiagnosisSuggestionListResDto wraps bounded mock choices in the shared envelope.

go
type DoctorDiagnosisSuggestionListResDto struct {
    Body types.CursorResponse[DoctorDiagnosisSuggestionListItemDto]
}

type DoctorExaminationSuggestionListItemDto ​

DoctorExaminationSuggestionListItemDto contains a catalogue example, never a patient finding.

go
type DoctorExaminationSuggestionListItemDto struct {
    ID      string   `json:"id"`
    Title   string   `json:"title"`
    Aliases []string `json:"aliases" nullable:"false"`
    Unit    string   `json:"unit"`
}

type DoctorExaminationSuggestionListReqDto ​

DoctorExaminationSuggestionListReqDto selects account-authenticated mock choices.

go
type DoctorExaminationSuggestionListReqDto struct {
    DoctorClinicalSuggestionQueryReqDto
}

type DoctorExaminationSuggestionListResDto ​

DoctorExaminationSuggestionListResDto wraps bounded mock choices in the shared envelope.

go
type DoctorExaminationSuggestionListResDto struct {
    Body types.CursorResponse[DoctorExaminationSuggestionListItemDto]
}

type DoctorHistoryAttributesDto ​

DoctorHistoryAttributesDto contains optional catalog allergy classification.

go
type DoctorHistoryAttributesDto struct {
    // AllergyKind classifies the allergen; omission serializes an empty object.
    AllergyKind string `json:"allergyKind,omitempty" enum:"Drug,Food,Other,Unspecified" doc:"AllergyKind classifies the allergen; omission serializes an empty object."`
}

type DoctorHistorySuggestionListBodyDto ​

DoctorHistorySuggestionListBodyDto retains the legacy envelope and includes cursor pagination for authenticated catalogue reads.

go
type DoctorHistorySuggestionListBodyDto struct {
    Message    string                               `json:"message"`
    StatusCode int                                  `json:"status_code"`
    Data       []DoctorHistorySuggestionListItemDto `json:"data" nullable:"false"`
    Pagination types.CursorPagination               `json:"pagination,omitempty"`
}

type DoctorHistorySuggestionListItemDto ​

DoctorHistorySuggestionListItemDto contains one choice with all selection metadata inline.

go
type DoctorHistorySuggestionListItemDto struct {
    ID  string `json:"id" format:"uuid"`
    // Title is the English display label.
    Title string `json:"title" doc:"Title is the English display label."`
    // Aliases includes Bengali and English synonyms and is never null.
    Aliases []string `json:"aliases" nullable:"false" doc:"Aliases includes Bengali and English synonyms and is never null."`
    // Category identifies the history editor section.
    Category string `json:"category" doc:"Category identifies the history editor section."`
    // Attributes contains classification defaults, never patient findings.
    Attributes DoctorHistoryAttributesDto `json:"attributes" doc:"Attributes contains classification defaults, never patient findings."`
}

type DoctorHistorySuggestionListReqDto ​

DoctorHistorySuggestionListReqDto defines the bounded, authenticated autocomplete request.

go
type DoctorHistorySuggestionListReqDto struct {
    Cursor        string `query:"cursor" maxLength:"8192"` // Authorization carries the active doctor bearer session.
    Authorization string `header:"Authorization" hidden:"true"`
    // Search matches normalized English titles and aliases, including Bengali; blank returns defaults.
    Search string `query:"search" maxLength:"255" doc:"Search matches normalized English titles and aliases, including Bengali; blank returns defaults."`
    // Limit defaults to 10 and accepts 1-100.
    Limit int `query:"limit" default:"10" minimum:"1" maximum:"100" doc:"Limit defaults to 10 and accepts 1-100."`
    // Category strictly selects one history section.
    Category string `query:"category" required:"true" enum:"medical,surgical,medication,allergy,family,social,present-illness,obstetric,pediatric,immunization,adverse-reaction,other" doc:"Category strictly selects one history section."`
}

type DoctorHistorySuggestionListResDto ​

DoctorHistorySuggestionListResDto wraps real catalogue choices.

go
type DoctorHistorySuggestionListResDto struct {
    Body DoctorHistorySuggestionListBodyDto
}

type DoctorInvestigationGroupInvestigationDto ​

DoctorInvestigationGroupInvestigationDto is an investigation display snapshot inside a group.

go
type DoctorInvestigationGroupInvestigationDto struct {
    ID      string   `json:"id"`
    Title   string   `json:"title"`
    Aliases []string `json:"aliases" nullable:"false"`
}

type DoctorInvestigationGroupListItemDto ​

DoctorInvestigationGroupListItemDto contains a read-only mock set of investigations commonly ordered together.

go
type DoctorInvestigationGroupListItemDto struct {
    ID             string                                     `json:"id"`
    Name           string                                     `json:"name"`
    NameBN         string                                     `json:"name_bn"`
    Investigations []DoctorInvestigationGroupInvestigationDto `json:"investigations" nullable:"false"`
}

type DoctorInvestigationGroupListReqDto ​

DoctorInvestigationGroupListReqDto selects authenticated mock investigation groups with complete membership.

go
type DoctorInvestigationGroupListReqDto struct{ DoctorSuggestionQueryReqDto }

type DoctorInvestigationGroupListResDto ​

DoctorInvestigationGroupListResDto wraps a mock investigation group page.

go
type DoctorInvestigationGroupListResDto struct {
    Body types.CursorResponse[DoctorInvestigationGroupListItemDto]
}

type DoctorInvestigationSuggestionListItemDto ​

DoctorInvestigationSuggestionListItemDto contains a catalogue example, never a patient finding.

go
type DoctorInvestigationSuggestionListItemDto struct {
    ID      string   `json:"id"`
    Title   string   `json:"title"`
    Aliases []string `json:"aliases" nullable:"false"`
}

type DoctorInvestigationSuggestionListReqDto ​

DoctorInvestigationSuggestionListReqDto selects account-authenticated mock choices.

go
type DoctorInvestigationSuggestionListReqDto struct {
    DoctorClinicalSuggestionQueryReqDto
}

type DoctorInvestigationSuggestionListResDto ​

DoctorInvestigationSuggestionListResDto wraps bounded mock choices in the shared envelope.

go
type DoctorInvestigationSuggestionListResDto struct {
    Body types.CursorResponse[DoctorInvestigationSuggestionListItemDto]
}

type DoctorLoginReqDto ​

DoctorLoginReqDto contains credentials for a doctor identity account.

go
type DoctorLoginReqDto struct {
    Body struct {
        Email    string `json:"email" format:"email" maxLength:"255" example:"doctor@example.com" doc:"Registered email address."`
        Password string `json:"password" minLength:"1" maxLength:"128" writeOnly:"true" example:"ExamplePassword123!" doc:"Current account password."`
    }
}

type DoctorLoginResDto ​

DoctorLoginResDto contains Identity-issued credentials for a persistent session.

go
type DoctorLoginResDto struct {
    Body types.SuccessResponse[identitypublic.TokenPair]
}

type DoctorMedicineClassDto ​

DoctorMedicineClassDto identifies a therapeutic class; its ID is not a generic ingredient ID.

go
type DoctorMedicineClassDto struct {
    ID   string `json:"id"`
    Name string `json:"name"`
}

type DoctorMedicineClassListItemDto ​

DoctorMedicineClassListItemDto contains a stable mock class ID and display name.

go
type DoctorMedicineClassListItemDto struct {
    ID   string `json:"id"`
    Name string `json:"name"`
}

type DoctorMedicineClassListReqDto ​

DoctorMedicineClassListReqDto selects authenticated mock therapeutic classes.

go
type DoctorMedicineClassListReqDto struct{ DoctorSuggestionQueryReqDto }

type DoctorMedicineClassListResDto ​

DoctorMedicineClassListResDto returns a bounded mock class page.

go
type DoctorMedicineClassListResDto struct {
    Body types.CursorResponse[DoctorMedicineClassListItemDto]
}

type DoctorMedicineGroupListItemDto ​

DoctorMedicineGroupListItemDto contains a versioned, read-only mock group and all its products.

go
type DoctorMedicineGroupListItemDto struct {
    ID       string                          `json:"id"`
    Name     string                          `json:"name"`
    NameBN   string                          `json:"name_bn"`
    Version  int                             `json:"version"`
    Products []DoctorMedicineGroupProductDto `json:"products" nullable:"false"`
}

type DoctorMedicineGroupListReqDto ​

DoctorMedicineGroupListReqDto selects authenticated mock groups with complete membership.

go
type DoctorMedicineGroupListReqDto struct{ DoctorSuggestionQueryReqDto }

type DoctorMedicineGroupListResDto ​

DoctorMedicineGroupListResDto wraps a mock group page.

go
type DoctorMedicineGroupListResDto struct {
    Body types.CursorResponse[DoctorMedicineGroupListItemDto]
}

type DoctorMedicineGroupProductDto ​

DoctorMedicineGroupProductDto is a product display snapshot without dosing directions.

go
type DoctorMedicineGroupProductDto struct {
    ID          string `json:"id"`
    GenericName string `json:"generic_name"`
    BrandName   string `json:"brand_name"`
    Strength    string `json:"strength"`
    Form        string `json:"form"`
    Route       string `json:"route"`
    Active      bool   `json:"active"`
}

type DoctorMedicineListItemDto ​

DoctorMedicineListItemDto exposes product selection fields. Mock IDs cannot authorize real prescription saves.

go
type DoctorMedicineListItemDto struct {
    ID               string                      `json:"id"`
    GenericName      string                      `json:"generic_name"`
    BrandName        string                      `json:"brand_name"`
    Strength         string                      `json:"strength"`
    Form             string                      `json:"form"`
    Route            string                      `json:"route"`
    Aliases          []string                    `json:"aliases" nullable:"false"`
    TherapeuticClass DoctorMedicineClassDto      `json:"therapeutic_class"`
    IngredientIDs    []string                    `json:"ingredient_ids" nullable:"false"`
    Active           bool                        `json:"active"`
    CatalogueVersion string                      `json:"catalogue_version"`
    UpdatedAt        time.Time                   `json:"updated_at"`
    QuickSigs        []DoctorMedicineQuickSigDto `json:"quick_sigs" nullable:"false"`
}

type DoctorMedicineListReqDto ​

DoctorMedicineListReqDto selects mock products, optionally filtered by a therapeutic class.

go
type DoctorMedicineListReqDto struct {
    DoctorSuggestionQueryReqDto
    ClassID string `query:"class_id" maxLength:"255"`
}

type DoctorMedicineListResDto ​

DoctorMedicineListResDto returns the mock product page and opaque continuation.

go
type DoctorMedicineListResDto struct {
    Body types.CursorResponse[DoctorMedicineListItemDto]
}

type DoctorMedicineQuickSigDto ​

DoctorMedicineQuickSigDto describes an explicitly selected, editable curated preset.

go
type DoctorMedicineQuickSigDto struct {
    ID           string `json:"id"`
    Label        string `json:"label"`
    Dose         string `json:"dose"`
    Frequency    string `json:"frequency"`
    Timing       string `json:"timing"`
    MealRelation string `json:"meal_relation"`
    Duration     string `json:"duration"`
}

type DoctorProfileBodyDto ​

DoctorProfileBodyDto wraps the doctor profile in the standard success response.

go
type DoctorProfileBodyDto struct {
    Message    string           `json:"message"`
    StatusCode int              `json:"status_code"`
    Data       DoctorProfileDto `json:"data"`
}

type DoctorProfileDetailsDto ​

DoctorProfileDetailsDto contains doctor-owned professional details.

go
type DoctorProfileDetailsDto struct {
    Qualifications []doctorpublic.CatalogEntry `json:"qualifications" nullable:"false"`
    ID             string                      `json:"id"`
    UserID         string                      `json:"user_id"`
    LicenseNumber  string                      `json:"license_number"`
    Speciality     doctorpublic.CatalogEntry   `json:"speciality"`
    Specialization []doctorpublic.CatalogEntry `json:"specialization" nullable:"false" maxItems:"30"`
    Qualification  string                      `json:"qualification,omitempty" maxLength:"7708" doc:"Qualification display summary; derived from catalog selections when configured."`
    Chambers       []doctorpublic.Chamber      `json:"chambers,omitempty" nullable:"false" maxItems:"20"`
    CreatedAt      time.Time                   `json:"created_at"`
    UpdatedAt      time.Time                   `json:"updated_at"`

    // Preference fields are mocked here until preference persistence is implemented.
    QualificationsBySpecialty map[string]string `json:"qualifications_by_specialty"`
    HeaderLeftHTML            string            `json:"header_left_html"`
    HeaderRightHTML           string            `json:"header_right_html"`
    FrequentComplaints        []string          `json:"frequent_complaints" nullable:"false"`
    FrequentDiagnoses         []string          `json:"frequent_diagnoses" nullable:"false"`
    FrequentInvestigations    []string          `json:"frequent_investigations" nullable:"false"`
    FrequentMedicationIDs     []string          `json:"frequent_medication_ids" nullable:"false"`
    FrequentAdvicePhraseIDs   []string          `json:"frequent_advice_phrase_ids" nullable:"false"`
    RecentMedicationIDs       []string          `json:"recent_medication_ids" nullable:"false"`
    RecentDiagnoses           []string          `json:"recent_diagnoses" nullable:"false"`
    UsualSigByMedicationID    map[string]string `json:"usual_sig_by_medication_id"`
}

type DoctorProfileDto ​

DoctorProfileDto extends identity details with the doctor's professional profile.

go
type DoctorProfileDto struct {
    identitypublic.Account
    Profile DoctorProfileDetailsDto `json:"profile"`
}

type DoctorProfileGetReqDto ​

DoctorProfileGetReqDto carries credentials for the current doctor.

go
type DoctorProfileGetReqDto struct {
    Authorization string `header:"Authorization" hidden:"true"`
}

type DoctorProfileGetResDto ​

DoctorProfileGetResDto contains the current doctor's identity and professional profile.

go
type DoctorProfileGetResDto struct{ Body DoctorProfileBodyDto }

type DoctorProfilePatchResDto ​

DoctorProfilePatchResDto contains the persisted professional profile.

go
type DoctorProfilePatchResDto struct {
    Body types.SuccessResponse[doctor.Profile]
}

type DoctorRegisterBodyDto ​

DoctorRegisterBodyDto wraps registration details in the standard success response.

go
type DoctorRegisterBodyDto struct {
    Message    string                     `json:"message"`
    StatusCode int                        `json:"status_code"`
    Data       usecase.RegistrationResult `json:"data"`
}

type DoctorRegisterResDto ​

DoctorRegisterResDto contains the successful doctor registration response.

go
type DoctorRegisterResDto struct{ Body DoctorRegisterBodyDto }

type DoctorSuggestionQueryReqDto ​

DoctorSuggestionQueryReqDto supplies the shared scope, search and pagination of mock catalogue queries.

go
type DoctorSuggestionQueryReqDto struct {
    AuthenticatedReqDto
    Search string `query:"search" maxLength:"255"`
    Cursor string `query:"cursor" maxLength:"8192"`
    Limit  int    `query:"limit" default:"20" minimum:"1" maximum:"100"`
}

type FinalPrescriptionAdviceDto ​

FinalPrescriptionAdviceDto archives independently editable text and a document-line ID.

go
type FinalPrescriptionAdviceDto struct {
    ID   string `json:"id" minLength:"1" maxLength:"255" pattern:"\\S"`
    Text string `json:"text" minLength:"1" maxLength:"1000" pattern:"\\S"`
}

type FinalPrescriptionAgeDto ​

FinalPrescriptionAgeDto retains an explicit age unit without calculating age from a birthday.

go
type FinalPrescriptionAgeDto struct {
    Value string `json:"value" minLength:"1" maxLength:"200"`
    Unit  string `json:"unit" enum:"year,month,day"`
}

type FinalPrescriptionCatalogEntryDto ​

FinalPrescriptionCatalogEntryDto archives a selected professional catalogue label.

go
type FinalPrescriptionCatalogEntryDto struct {
    ID   string `json:"id" format:"uuid"`
    Name string `json:"name" maxLength:"255"`
}

type FinalPrescriptionChamberDto ​

FinalPrescriptionChamberDto archives a professional practice location.

go
type FinalPrescriptionChamberDto struct {
    Name    string `json:"name" maxLength:"2000"`
    Address string `json:"address" maxLength:"2000"`
    Hours   string `json:"hours" maxLength:"2000"`
}

type FinalPrescriptionClinicalDto ​

FinalPrescriptionClinicalDto retains ordered sections and explicit allergy assessment.

go
type FinalPrescriptionClinicalDto struct {
    ChiefComplaints   []FinalPrescriptionComplaintDto   `json:"chief_complaints" nullable:"false" maxItems:"100"`
    History           []FinalPrescriptionHistoryDto     `json:"history" nullable:"false" maxItems:"100"`
    DrugAllergyStatus string                            `json:"drug_allergy_status" enum:"not_recorded,none_known,unable_to_ascertain,recorded"`
    Examinations      []FinalPrescriptionExaminationDto `json:"examinations" nullable:"false" maxItems:"100"`
    Diagnoses         []FinalPrescriptionDiagnosisDto   `json:"diagnoses" nullable:"false" maxItems:"100"`
    Investigations    []FinalPrescriptionLineDto        `json:"investigations" nullable:"false" maxItems:"100"`
    Medications       []FinalPrescriptionMedicationDto  `json:"medications" nullable:"false" maxItems:"100"`
    Advice            []FinalPrescriptionAdviceDto      `json:"advice" nullable:"false" maxItems:"100"`
    FollowUp          *FinalPrescriptionFollowUpDto     `json:"follow_up"`
}

func (FinalPrescriptionClinicalDto) TransformSchema ​

go
func (FinalPrescriptionClinicalDto) TransformSchema(_ huma.Registry, s *huma.Schema) *huma.Schema

TransformSchema allows explicit null for an absent follow-up date.

type FinalPrescriptionComplaintDto ​

FinalPrescriptionComplaintDto contains clinician-entered complaint text and optional associations.

go
type FinalPrescriptionComplaintDto struct {
    FinalPrescriptionLineDto
    Duration   string   `json:"duration" maxLength:"2000"`
    Associated []string `json:"associated" nullable:"false" maxItems:"100"`
}

type FinalPrescriptionDesignDto ​

FinalPrescriptionDesignDto archives clinical letterhead HTML; images and layout settings are outside v1.

go
type FinalPrescriptionDesignDto struct {
    ConsultationDate string `json:"consultation_date" format:"date"`
    Language         string `json:"language" enum:"bn,en"`
    HeaderLeftHTML   string `json:"header_left_html" maxLength:"30000"`
    HeaderRightHTML  string `json:"header_right_html" maxLength:"30000"`
    FooterHTML       string `json:"footer_html" maxLength:"30000"`
}

type FinalPrescriptionDiagnosisDto ​

FinalPrescriptionDiagnosisDto preserves clinician-entered assessment certainty.

go
type FinalPrescriptionDiagnosisDto struct {
    FinalPrescriptionLineDto
    Certainty string `json:"certainty" enum:",provisional,confirmed,differential"`
}

type FinalPrescriptionDoctorDto ​

FinalPrescriptionDoctorDto preserves professional identity and display selections after verification.

go
type FinalPrescriptionDoctorDto struct {
    ID             string                             `json:"id" format:"uuid"`
    UserID         string                             `json:"user_id" format:"uuid"`
    Name           string                             `json:"name" minLength:"1" maxLength:"255" pattern:"\\S"`
    LicenseNumber  string                             `json:"license_number" minLength:"1" maxLength:"255"`
    Speciality     FinalPrescriptionCatalogEntryDto   `json:"speciality"`
    Qualifications []FinalPrescriptionCatalogEntryDto `json:"qualifications" nullable:"false" maxItems:"100"`
    Chambers       []FinalPrescriptionChamberDto      `json:"chambers" nullable:"false" maxItems:"20"`
}

type FinalPrescriptionExaminationDto ​

FinalPrescriptionExaminationDto stores textual observations without automatic normal findings.

go
type FinalPrescriptionExaminationDto struct {
    FinalPrescriptionLineDto
    Value string `json:"value" maxLength:"300"`
    Unit  string `json:"unit" maxLength:"40"`
}

type FinalPrescriptionFollowUpDto ​

FinalPrescriptionFollowUpDto records a date without booking an appointment.

go
type FinalPrescriptionFollowUpDto struct {
    Date string `json:"date" format:"date"`
}

type FinalPrescriptionHistoryAttributesDto ​

FinalPrescriptionHistoryAttributesDto is patient-specific history, distinct from vocabulary classifications.

go
type FinalPrescriptionHistoryAttributesDto struct {
    Since       string `json:"since,omitempty" maxLength:"2000"`
    When        string `json:"when,omitempty" maxLength:"2000"`
    Status      string `json:"status,omitempty" maxLength:"2000"`
    Dose        string `json:"dose,omitempty" maxLength:"2000"`
    Frequency   string `json:"frequency,omitempty" maxLength:"2000"`
    Reaction    string `json:"reaction,omitempty" maxLength:"2000"`
    Severity    string `json:"severity,omitempty" maxLength:"2000"`
    AllergyKind string `json:"allergyKind,omitempty" enum:"Drug,Food,Other,Unspecified"`
    Relation    string `json:"relation,omitempty" maxLength:"2000"`
    Amount      string `json:"amount,omitempty" maxLength:"2000"`
}

type FinalPrescriptionHistoryDto ​

FinalPrescriptionHistoryDto preserves nonprinting history in authorized clinical views.

go
type FinalPrescriptionHistoryDto struct {
    FinalPrescriptionLineDto
    Category       string                                `json:"category" enum:"medical,surgical,medication,allergy,family,social,present-illness,obstetric,pediatric,immunization,adverse-reaction,other"`
    Attributes     FinalPrescriptionHistoryAttributesDto `json:"attributes"`
    IncludeInPrint bool                                  `json:"include_in_print"`
}

type FinalPrescriptionLineDto ​

FinalPrescriptionLineDto preserves a document-line ID independently from vocabulary IDs.

go
type FinalPrescriptionLineDto struct {
    ID      string `json:"id" minLength:"1" maxLength:"255" pattern:"\\S"`
    Title   string `json:"title" minLength:"1" maxLength:"300" pattern:"\\S"`
    Details string `json:"details" maxLength:"2000"`
}

type FinalPrescriptionMedicationDto ​

FinalPrescriptionMedicationDto stores the clinician's directions; no dosing is inferred from the catalogue.

go
type FinalPrescriptionMedicationDto struct {
    ID                    string                      `json:"id" minLength:"1" maxLength:"255" pattern:"\\S"`
    Product               FinalPrescriptionProductDto `json:"product"`
    Dose                  string                      `json:"dose" minLength:"1" maxLength:"200" pattern:"\\S"`
    Frequency             string                      `json:"frequency" minLength:"1" maxLength:"200" pattern:"\\S"`
    Timing                string                      `json:"timing" maxLength:"200"`
    MealRelation          string                      `json:"meal_relation" enum:",before_food,after_food,with_food,not_applicable"`
    Duration              string                      `json:"duration" maxLength:"200"`
    Ongoing               bool                        `json:"ongoing"`
    AsNeeded              bool                        `json:"as_needed"`
    AsNeededReason        string                      `json:"as_needed_reason" maxLength:"200"`
    MaximumDailyDose      string                      `json:"maximum_daily_dose" maxLength:"200"`
    Indication            string                      `json:"indication" maxLength:"200"`
    AdditionalInstruction string                      `json:"additional_instruction" maxLength:"500"`
}

type FinalPrescriptionMetadataDto ​

FinalPrescriptionMetadataDto contains only server-generated finalized record metadata.

go
type FinalPrescriptionMetadataDto struct {
    ID                 string    `json:"id" format:"uuid"`
    OrganizationID     string    `json:"organization_id" format:"uuid"`
    DoctorID           string    `json:"doctor_id" format:"uuid"`
    PatientID          *string   `json:"patient_id" nullable:"true" format:"uuid"`
    PrescriptionNumber string    `json:"prescription_number"`
    Status             string    `json:"status" enum:"finalized"`
    Version            int64     `json:"version"`
    CreatedAt          time.Time `json:"created_at"`
    FinalizedAt        time.Time `json:"finalized_at"`
}

type FinalPrescriptionPatientDto ​

FinalPrescriptionPatientDto is a consultation snapshot; a null ID does not create a patient profile.

go
type FinalPrescriptionPatientDto struct {
    ID   *string                  `json:"id" nullable:"true" format:"uuid"`
    Name string                   `json:"name" minLength:"1" maxLength:"255" pattern:"\\S"`
    Age  *FinalPrescriptionAgeDto `json:"age"`
    Sex  string                   `json:"sex,omitempty" enum:"male,female,other,unknown"`
}

func (FinalPrescriptionPatientDto) TransformSchema ​

go
func (FinalPrescriptionPatientDto) TransformSchema(_ huma.Registry, s *huma.Schema) *huma.Schema

TransformSchema allows explicit null for a referenced snapshot age object.

type FinalPrescriptionPayloadDto ​

FinalPrescriptionPayloadDto is the version-one clinical document archived by final save.

go
type FinalPrescriptionPayloadDto struct {
    SchemaVersion  int                          `json:"schema_version" enum:"1"`
    OrganizationID string                       `json:"organization_id" format:"uuid"`
    Doctor         FinalPrescriptionDoctorDto   `json:"doctor"`
    Patient        FinalPrescriptionPatientDto  `json:"patient"`
    Prescription   FinalPrescriptionDesignDto   `json:"prescription"`
    Clinical       FinalPrescriptionClinicalDto `json:"clinical"`
}

type FinalPrescriptionProductDto ​

FinalPrescriptionProductDto identifies an authoritative product and its submitted display snapshot.

go
type FinalPrescriptionProductDto struct {
    ID          string `json:"id" minLength:"1" maxLength:"255"`
    GenericName string `json:"generic_name" minLength:"1" maxLength:"255"`
    BrandName   string `json:"brand_name" maxLength:"255"`
    Strength    string `json:"strength" minLength:"1" maxLength:"255"`
    Form        string `json:"form" minLength:"1" maxLength:"255"`
    Route       string `json:"route" minLength:"1" maxLength:"255"`
}

type GetFinalPrescriptionDataDto ​

GetFinalPrescriptionDataDto contains the complete archived payload, never current profile/catalogue joins.

go
type GetFinalPrescriptionDataDto struct {
    FinalPrescriptionMetadataDto
    Payload FinalPrescriptionPayloadDto `json:"payload"`
}

type GetFinalPrescriptionReqDto ​

GetFinalPrescriptionReqDto verifies the captured organization against the archived resource.

go
type GetFinalPrescriptionReqDto struct {
    AuthenticatedReqDto
    PrescriptionID string `path:"prescriptionId" format:"uuid"`
    OrganizationID string `query:"organization_id" required:"true" format:"uuid"`
}

type GetFinalPrescriptionResDto ​

GetFinalPrescriptionResDto wraps the print source in the shared resource envelope.

go
type GetFinalPrescriptionResDto struct {
    Body types.SuccessResponse[GetFinalPrescriptionDataDto]
}

type GetPadSettingsBodyDto ​

GetPadSettingsBodyDto uses a null data member when no design has been saved.

go
type GetPadSettingsBodyDto struct {
    Message    string              `json:"message"`
    StatusCode int                 `json:"status_code"`
    Data       *PadSettingsDataDto `json:"data"`
}

func (GetPadSettingsBodyDto) TransformSchema ​

go
func (GetPadSettingsBodyDto) TransformSchema(_ huma.Registry, s *huma.Schema) *huma.Schema

TransformSchema documents the explicit null of an account without saved settings.

type GetPadSettingsReqDto ​

GetPadSettingsReqDto identifies the account through credentials only; no organization is accepted.

go
type GetPadSettingsReqDto struct{ AuthenticatedReqDto }

type GetPadSettingsResDto ​

GetPadSettingsResDto wraps the saved design or null.

go
type GetPadSettingsResDto struct{ Body GetPadSettingsBodyDto }

type GetPatientReqDto ​

GetPatientReqDto identifies the requested patient.

go
type GetPatientReqDto struct{ PatientPathReqDto }

type GetPatientResDto ​

GetPatientResDto wraps an authorized patient profile.

go
type GetPatientResDto struct {
    Body types.SuccessResponse[types.Patient]
}

type ListDoctorOrganizationsItemDto ​

ListDoctorOrganizationsItemDto exposes an organization assigned to the authenticated doctor.

go
type ListDoctorOrganizationsItemDto struct {
    ID          string `json:"id" format:"uuid"`
    Name        string `json:"name"`
    Address     string `json:"address"`
    Description string `json:"description"`
    Slug        string `json:"slug"`
    Status      string `json:"status" enum:"active"`
}

type ListDoctorOrganizationsReqDto ​

ListDoctorOrganizationsReqDto identifies the authenticated doctor; no selected organization is needed.

go
type ListDoctorOrganizationsReqDto struct{ AuthenticatedInput }

type ListDoctorOrganizationsResDto ​

ListDoctorOrganizationsResDto wraps the doctor's assigned organizations.

go
type ListDoctorOrganizationsResDto struct {
    Body types.SuccessResponse[[]ListDoctorOrganizationsItemDto]
}

type ListFinalPrescriptionsItemDto ​

ListFinalPrescriptionsItemDto exposes list metadata without clinical content.

go
type ListFinalPrescriptionsItemDto struct {
    FinalPrescriptionMetadataDto
    PatientName      string `json:"patient_name"`
    ConsultationDate string `json:"consultation_date" format:"date"`
}

type ListFinalPrescriptionsReqDto ​

ListFinalPrescriptionsReqDto selects saved summaries with scoped filter-bound pagination.

go
type ListFinalPrescriptionsReqDto struct {
    AuthenticatedReqDto
    PaginationReqDto
    OrganizationID string `query:"organization_id" required:"true" format:"uuid"`
    PatientID      string `query:"patient_id" format:"uuid"`
    Search         string `query:"search" maxLength:"255"`
    DateFrom       string `query:"date_from" format:"date"`
    DateTo         string `query:"date_to" format:"date"`
}

type ListFinalPrescriptionsResDto ​

ListFinalPrescriptionsResDto wraps summary rows and their next cursor.

go
type ListFinalPrescriptionsResDto struct {
    Body types.CursorResponse[ListFinalPrescriptionsItemDto]
}

type ListInput ​

ListInput contains the list request parameters.

go
type ListInput struct {
    AuthenticatedInput
    PaginationInput
}

type ListMyVerificationsHTTPInput ​

ListMyVerificationsHTTPInput filters the authenticated doctor's submissions only.

go
type ListMyVerificationsHTTPInput struct {
    ListInput
    Status string `query:"status" enum:"pending,verified,rejected"`
}

type ListPatientsBodyDto ​

ListPatientsBodyDto contains patients and pagination in the common success envelope.

go
type ListPatientsBodyDto struct {
    Message    string                    `json:"message"`
    StatusCode int                       `json:"status_code"`
    Data       []ListPatientsItemDto     `json:"data" nullable:"false"`
    Pagination ListPatientsPaginationDto `json:"pagination"`
}

type ListPatientsItemDto ​

ListPatientsItemDto contains one authorized organization patient profile.

go
type ListPatientsItemDto types.Patient

type ListPatientsPaginationDto ​

ListPatientsPaginationDto describes the complete filtered result and current page.

go
type ListPatientsPaginationDto struct {
    NextCursor  string `json:"next_cursor"`
    CurrentPage int    `json:"current_page"`
    PerPage     int    `json:"per_page"`
    TotalPages  int    `json:"total_pages"`
    TotalItems  int    `json:"total_items"`
}

type ListPatientsReqDto ​

ListPatientsReqDto selects an organization, search and continuation.

go
type ListPatientsReqDto struct {
    AuthenticatedReqDto
    PaginationReqDto
    OrganizationID string `query:"organization_id" required:"true" format:"uuid"`
    Search         string `query:"search" maxLength:"255" doc:"Search name, ID, MRN, email, phone or address within the organization."`
    Query          string `query:"q" maxLength:"255" deprecated:"true" doc:"Deprecated alias for search. Use search for new clients."`
}

func (*ListPatientsReqDto) Resolve ​

go
func (input *ListPatientsReqDto) Resolve(_ huma.Context) []error

Resolve rejects conflicting search parameters before invoking Patient capabilities.

type ListPatientsResDto ​

ListPatientsResDto wraps the organization patient list response.

go
type ListPatientsResDto struct{ Body ListPatientsBodyDto }

type ManagementHandler ​

ManagementHandler wires profile edits and remaining documentation-first operations.

go
type ManagementHandler struct {
    PatchMyDoctorProfile managementExecutor[usecase.PatchMyDoctorProfileInput, doctorpublic.Profile]
    ListMyVerifications  managementExecutor[usecase.ListMyVerificationsInput, adminpublic.VerificationPage]
}

func NewManagementHandler ​

go
func NewManagementHandler() *ManagementHandler

NewManagementHandler creates fail-closed profile editing and remaining stub operations.

func (*ManagementHandler) RegisterHuma ​

go
func (h *ManagementHandler) RegisterHuma(api huma.API)

RegisterHuma publishes profile editing and the remaining validated 501 contracts.

type OrganizationInput ​

OrganizationInput contains the organization request parameters.

go
type OrganizationInput struct {
    AuthenticatedInput
    OrganizationID string `path:"organizationId" minLength:"1"`
}

type PadSettingsDataDto ​

PadSettingsDataDto is the stored account-scoped resource.

go
type PadSettingsDataDto struct {
    OwnerUserID string                 `json:"owner_user_id" format:"uuid"`
    Revision    int64                  `json:"revision" minimum:"1"`
    UpdatedAt   time.Time              `json:"updated_at"`
    Resource    PadSettingsResourceDto `json:"resource"`
}

type PadSettingsResourceDto ​

PadSettingsResourceDto wraps the value with its schema version, which is not a concurrency revision.

go
type PadSettingsResourceDto struct {
    Version int                 `json:"version" enum:"1"`
    Value   PadSettingsValueDto `json:"value"`
}

type PadSettingsValueDto ​

PadSettingsValueDto is the complete version-one design. Property names are camelCase by contract. Image fields accept only PNG data URLs or null; the server re-encodes them and strips metadata.

go
type PadSettingsValueDto struct {
    ThemePreset              string  `json:"themePreset" minLength:"1" maxLength:"64" pattern:"^[a-z0-9]+(-[a-z0-9]+)*$"`
    PrimaryColor             string  `json:"primaryColor" pattern:"^#[0-9a-fA-F]{6}$"`
    HeaderGradientEnabled    bool    `json:"headerGradientEnabled"`
    HeaderGradientStartColor string  `json:"headerGradientStartColor" pattern:"^#[0-9a-fA-F]{6}$"`
    HeaderGradientEndColor   string  `json:"headerGradientEndColor" pattern:"^#[0-9a-fA-F]{6}$"`
    HeaderGradientTextColor  string  `json:"headerGradientTextColor" pattern:"^#[0-9a-fA-F]{6}$"`
    HeaderGradientDirection  string  `json:"headerGradientDirection" minLength:"1" maxLength:"64" pattern:"^[a-z0-9]+(-[a-z0-9]+)*$"`
    HeaderFontFamily         string  `json:"headerFontFamily" enum:"Inter,Geist,Noto Sans Bengali,Georgia,Arial"`
    BodyFontFamily           string  `json:"bodyFontFamily" enum:"Inter,Geist,Noto Sans Bengali,Georgia,Arial"`
    FontSizeScale            string  `json:"fontSizeScale" minLength:"1" maxLength:"64" pattern:"^[a-z0-9]+(-[a-z0-9]+)*$"`
    HeaderStyle              string  `json:"headerStyle" minLength:"1" maxLength:"64" pattern:"^[a-z0-9]+(-[a-z0-9]+)*$"`
    ColumnRatio              string  `json:"columnRatio" minLength:"1" maxLength:"64" pattern:"^[a-z0-9]+(-[a-z0-9]+)*$"`
    ShowChamberDetails       bool    `json:"showChamberDetails"`
    ShowHeaderLogo           bool    `json:"showHeaderLogo"`
    HeaderLogoDataURL        *string `json:"headerLogoDataUrl" nullable:"true" maxLength:"750000"`
    HeaderLogoSize           string  `json:"headerLogoSize" minLength:"1" maxLength:"64" pattern:"^[a-z0-9]+(-[a-z0-9]+)*$"`
    RxWatermarkEnabled       bool    `json:"rxWatermarkEnabled"`
    RxWatermarkDataURL       *string `json:"rxWatermarkDataUrl" nullable:"true" maxLength:"750000"`
    RxWatermarkSize          string  `json:"rxWatermarkSize" minLength:"1" maxLength:"64" pattern:"^[a-z0-9]+(-[a-z0-9]+)*$"`
    RxWatermarkOpacity       int     `json:"rxWatermarkOpacity" minimum:"0" maximum:"100"`
    ShowDoctorSignature      bool    `json:"showDoctorSignature"`
    SignatureDataURL         *string `json:"signatureDataUrl" nullable:"true" maxLength:"750000"`
    ShowRegistrationNumber   bool    `json:"showRegistrationNumber"`
    HeaderLeftHTML           string  `json:"headerLeftHtml" maxLength:"30000"`
    HeaderRightHTML          string  `json:"headerRightHtml" maxLength:"30000"`
    PrintPaperSize           string  `json:"printPaperSize" minLength:"1" maxLength:"64" pattern:"^[a-z0-9]+(-[a-z0-9]+)*$"`
    PrintColorMode           string  `json:"printColorMode" minLength:"1" maxLength:"64" pattern:"^[a-z0-9]+(-[a-z0-9]+)*$"`
    FooterHTML               string  `json:"footerHtml" maxLength:"30000"`
    Language                 string  `json:"language" enum:"bn,en"`
}

type PaginationInput ​

PaginationInput contains the shared cursor and bounded page-size parameters.

go
type PaginationInput struct {
    Limit  int    `query:"limit" minimum:"1" maximum:"100" default:"20"`
    Cursor string `query:"cursor" doc:"Opaque cursor from the preceding response."`
}

type PaginationReqDto ​

PaginationReqDto defines bounded cursor pagination.

go
type PaginationReqDto struct {
    Limit  int    `query:"limit" minimum:"1" maximum:"100" default:"20"`
    Cursor string `query:"cursor" maxLength:"8192"`
}

type PatchPatientBodyDto ​

PatchPatientBodyDto retains explicit null versus omitted editable fields.

go
type PatchPatientBodyDto types.PatchPatientParams

func (PatchPatientBodyDto) TransformSchema ​

go
func (b PatchPatientBodyDto) TransformSchema(_ huma.Registry, s *huma.Schema) *huma.Schema

TransformSchema documents clearing optional enum fields.

func (*PatchPatientBodyDto) UnmarshalJSON ​

go
func (b *PatchPatientBodyDto) UnmarshalJSON(data []byte) error

UnmarshalJSON preserves field presence and explicit clearing.

type PatchPatientReqDto ​

PatchPatientReqDto maps the version and presence-sensitive editable body.

go
type PatchPatientReqDto struct {
    PatientPathReqDto
    Body    PatchPatientBodyDto
    RawBody []byte
}

func (*PatchPatientReqDto) Resolve ​

go
func (in *PatchPatientReqDto) Resolve(_ huma.Context) []error

Resolve validates request-local demographic and presence constraints.

type PatchPatientResDto ​

PatchPatientResDto wraps the current profile following a patch.

go
type PatchPatientResDto struct {
    Body types.SuccessResponse[types.Patient]
}

type PatchProfileHTTPInput ​

PatchProfileHTTPInput edits only supplied professional fields.

go
type PatchProfileHTTPInput struct {
    AuthenticatedInput
    Body    usecase.PatchMyDoctorProfileParams
    RawBody []byte
}

func (*PatchProfileHTTPInput) Resolve ​

go
func (i *PatchProfileHTTPInput) Resolve(_ huma.Context) []error

Resolve rejects patches with no editable field.

type PatientClinicalSummaryDataDto ​

PatientClinicalSummaryDataDto distinguishes missing integrations from empty authoritative records.

go
type PatientClinicalSummaryDataDto struct {
    OrganizationID        string                                   `json:"organization_id"`
    PatientID             string                                   `json:"patient_id"`
    History               []FinalPrescriptionHistoryDto            `json:"history" nullable:"false"`
    DrugAllergyStatus     string                                   `json:"drug_allergy_status" enum:"not_recorded,none_known,unable_to_ascertain,recorded"`
    AllergyAssessedAt     *time.Time                               `json:"allergy_assessed_at" nullable:"true"`
    HistorySource         *ClinicalSummaryHistorySourceDto         `json:"history_source"`
    RecentVisits          []ClinicalSummaryVisitDto                `json:"recent_visits" nullable:"false"`
    PreviousPrescriptions []ClinicalSummaryPrescriptionDto         `json:"previous_prescriptions" nullable:"false"`
    PreviousObservations  []ClinicalSummaryObservationDto          `json:"previous_observations" nullable:"false"`
    PreviousLabResults    []ClinicalSummaryLabDto                  `json:"previous_lab_results" nullable:"false"`
    PendingInvestigations []ClinicalSummaryPendingInvestigationDto `json:"pending_investigations" nullable:"false"`
    UnavailableSections   []string                                 `json:"unavailable_sections" nullable:"false"`
}

func (PatientClinicalSummaryDataDto) TransformSchema ​

go
func (PatientClinicalSummaryDataDto) TransformSchema(_ huma.Registry, s *huma.Schema) *huma.Schema

TransformSchema describes a null history source when no finalized assessment exists.

type PatientClinicalSummaryReqDto ​

PatientClinicalSummaryReqDto requests a bounded historical panel, not an exhaustive export.

go
type PatientClinicalSummaryReqDto struct {
    AuthenticatedReqDto
    PatientID      string `path:"patientId" format:"uuid"`
    OrganizationID string `query:"organization_id" required:"true" format:"uuid"`
    Limit          int    `query:"limit" default:"10" minimum:"1" maximum:"100"`
}

type PatientClinicalSummaryResDto ​

PatientClinicalSummaryResDto wraps the authoritative historical panel.

go
type PatientClinicalSummaryResDto struct {
    Body types.SuccessResponse[PatientClinicalSummaryDataDto]
}

type PatientHandler ​

PatientHandler delegates Doctor portal operations through shared patient contracts.

go
type PatientHandler struct {
    Create *usecase.CreatePatientUseCase
    List   *usecase.ListPatientsUseCase
    Get    *usecase.GetPatientUseCase
    Patch  *usecase.PatchPatientUseCase
}

func (*PatientHandler) RegisterHuma ​

go
func (h *PatientHandler) RegisterHuma(a huma.API)

RegisterHuma registers the Doctor-owned patient contracts.

type PatientPathReqDto ​

PatientPathReqDto carries the bearer header and canonical patient UUID.

go
type PatientPathReqDto struct {
    AuthenticatedReqDto
    PatientID string `path:"patientId" format:"uuid"`
}

type PortalHandler ​

PortalHandler wires documentation-first routes to their individual TODO use cases.

go
type PortalHandler struct {
    RegisterDoctor               *usecase.RegisterDoctorUseCase
    ListMyDoctorOrganizations    *usecase.ListMyDoctorOrganizationsUseCase
    DiscoverOrganizations        *usecase.DiscoverOrganizationsUseCase
    ListAssignedOrganizations    usecase.ListAssignedOrganizationsUseCase
    ViewDiscoverableOrganization *usecase.ViewDiscoverableOrganizationUseCase
    PreviewDoctorInvitation      *usecase.PreviewDoctorInvitationUseCase
    CreateDoctorJoinRequest      *usecase.CreateDoctorJoinRequestUseCase
    ListMyDoctorJoinRequests     *usecase.ListMyDoctorJoinRequestsUseCase
    CancelDoctorJoinRequest      *usecase.CancelDoctorJoinRequestUseCase
}

func NewPortalHandler ​

go
func NewPortalHandler() *PortalHandler

NewPortalHandler creates the documentation-first portal handler.

func (*PortalHandler) RegisterHuma ​

go
func (h *PortalHandler) RegisterHuma(api huma.API)

RegisterHuma registers validated API contracts with documented authentication and 501 responses.

type PortalOutput ​

PortalOutput wraps the intended success body documented alongside the actual 501 response.

go
type PortalOutput[T any] struct{ Body T }

type ProfessionalCatalogListOutput ​

ProfessionalCatalogListOutput contains reusable reference choices.

go
type ProfessionalCatalogListOutput struct {
    Body types.SuccessResponse[[]doctor.CatalogEntry]
}

type ProfessionalSelectionsInput ​

ProfessionalSelectionsInput contains authenticated profile selections.

go
type ProfessionalSelectionsInput struct {
    AuthenticatedInput
    Body usecase.ProfessionalSelections
}

type ProfileHandler ​

ProfileHandler delivers the current doctor's profile.

go
type ProfileHandler struct {
    // contains filtered or unexported fields
}

func NewProfileHandler ​

go
func NewProfileHandler(verifyAuth *usecase.VerifyAuthUseCase) *ProfileHandler

NewProfileHandler reuses doctor session and profile verification for self-service.

func (*ProfileHandler) RegisterHuma ​

go
func (h *ProfileHandler) RegisterHuma(api huma.API)

RegisterHuma registers the authenticated doctor profile query.

type RegisterInput ​

RegisterInput contains identity and professional details for public registration.

go
type RegisterInput struct{ Body usecase.RegistrationParams }

type RequestInput ​

RequestInput identifies a join request belonging to the authenticated doctor.

go
type RequestInput struct {
    AuthenticatedInput
    RequestID string `path:"requestId" minLength:"1"`
}

type SaveFinalPrescriptionReqDto ​

SaveFinalPrescriptionReqDto captures a detached version-one document and one logical-save key.

go
type SaveFinalPrescriptionReqDto struct {
    AuthenticatedReqDto
    IdempotencyKey string `header:"Idempotency-Key" required:"true" minLength:"1" maxLength:"128"`
    Body           FinalPrescriptionPayloadDto
    RawBody        []byte
}

func (*SaveFinalPrescriptionReqDto) Resolve ​

go
func (in *SaveFinalPrescriptionReqDto) Resolve(_ huma.Context) []error

Resolve enforces request-local clinical consistency without inventing patient findings.

type SaveFinalPrescriptionResDto ​

SaveFinalPrescriptionResDto returns a persisted record identity and its detail location.

go
type SaveFinalPrescriptionResDto struct {
    Location string `header:"Location"`
    Body     types.SuccessResponse[FinalPrescriptionMetadataDto]
}

type SavePadSettingsBodyDto ​

SavePadSettingsBodyDto replaces the full design. A null expected_revision creates only when absent.

go
type SavePadSettingsBodyDto struct {
    ExpectedRevision *int64                 `json:"expected_revision" nullable:"true" minimum:"1"`
    Resource         PadSettingsResourceDto `json:"resource"`
}

type SavePadSettingsReqDto ​

SavePadSettingsReqDto carries credentials, the replacement design and the raw body for null checks.

go
type SavePadSettingsReqDto struct {
    AuthenticatedReqDto
    Body    SavePadSettingsBodyDto
    RawBody []byte
}

type SavePadSettingsResDto ​

SavePadSettingsResDto returns the stored design with its incremented revision.

go
type SavePadSettingsResDto struct {
    Body types.SuccessResponse[PadSettingsDataDto]
}

type SpecializationListInput ​

SpecializationListInput filters public child catalog choices.

go
type SpecializationListInput struct {
    SpecialityID string `query:"specialityId" format:"uuid"`
}

type TokenInput ​

TokenInput contains the token request parameters.

go
type TokenInput struct {
    Token string `path:"token" minLength:"1" maxLength:"512" doc:"Single-use invitation token from the registration link."`
}

Generated by gomarkdoc

Documentation follows the source. Planned contracts are marked explicitly.