http
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(api huma.API, uc usecase.ClinicalListChiefComplaintUseCase)
- func RegisterDoctorFinalPrescriptions(a huma.API, uc usecase.FinalPrescriptionUseCases)
- func RegisterDoctorHistorySuggestionList(api huma.API, uc usecase.ClinicalListHistorySuggestionUseCase)
- func RegisterDoctorPadSettings(a huma.API, get usecase.GetPadSettingsUseCase, save usecase.SavePadSettingsUseCase)
- func RegisterDoctorPadSuggestions(a huma.API, verify *usecase.VerifyAuthUseCase)
- func RegisterProfessionalCatalogs(api huma.API, catalogs doctor.CatalogReader, selections *usecase.SelectProfessionalDetails)
- type AuthHandler
- type AuthenticatedInput
- type AuthenticatedReqDto
- type ClinicalSummaryHistorySourceDto
- type ClinicalSummaryLabDto
- type ClinicalSummaryObservationDto
- type ClinicalSummaryPendingInvestigationDto
- type ClinicalSummaryPrescriptionDto
- type ClinicalSummaryVisitDto
- type CreatePatientBodyDto
- type CreatePatientReqDto
- type CreatePatientResDto
- type CreateRequestInput
- type DoctorAdviceGroupListItemDto
- type DoctorAdviceGroupListReqDto
- type DoctorAdviceGroupListResDto
- type DoctorAdviceListItemDto
- type DoctorAdviceListReqDto
- type DoctorAdviceListResDto
- type DoctorAuthVerifyDataDto
- type DoctorAuthVerifyReqDto
- type DoctorAuthVerifyResDto
- type DoctorChiefComplaintListBodyDto
- type DoctorChiefComplaintListItemDto
- type DoctorChiefComplaintListReqDto
- type DoctorChiefComplaintListResDto
- type DoctorClinicalSuggestionQueryReqDto
- type DoctorDiagnosisSuggestionListItemDto
- type DoctorDiagnosisSuggestionListReqDto
- type DoctorDiagnosisSuggestionListResDto
- type DoctorExaminationSuggestionListItemDto
- type DoctorExaminationSuggestionListReqDto
- type DoctorExaminationSuggestionListResDto
- type DoctorHistoryAttributesDto
- type DoctorHistorySuggestionListBodyDto
- type DoctorHistorySuggestionListItemDto
- type DoctorHistorySuggestionListReqDto
- type DoctorHistorySuggestionListResDto
- type DoctorInvestigationGroupInvestigationDto
- type DoctorInvestigationGroupListItemDto
- type DoctorInvestigationGroupListReqDto
- type DoctorInvestigationGroupListResDto
- type DoctorInvestigationSuggestionListItemDto
- type DoctorInvestigationSuggestionListReqDto
- type DoctorInvestigationSuggestionListResDto
- type DoctorLoginReqDto
- type DoctorLoginResDto
- type DoctorMedicineClassDto
- type DoctorMedicineClassListItemDto
- type DoctorMedicineClassListReqDto
- type DoctorMedicineClassListResDto
- type DoctorMedicineGroupListItemDto
- type DoctorMedicineGroupListReqDto
- type DoctorMedicineGroupListResDto
- type DoctorMedicineGroupProductDto
- type DoctorMedicineListItemDto
- type DoctorMedicineListReqDto
- type DoctorMedicineListResDto
- type DoctorMedicineQuickSigDto
- type DoctorProfileBodyDto
- type DoctorProfileDetailsDto
- type DoctorProfileDto
- type DoctorProfileGetReqDto
- type DoctorProfileGetResDto
- type DoctorProfilePatchResDto
- type DoctorRegisterBodyDto
- type DoctorRegisterResDto
- type DoctorSuggestionQueryReqDto
- type FinalPrescriptionAdviceDto
- type FinalPrescriptionAgeDto
- type FinalPrescriptionCatalogEntryDto
- type FinalPrescriptionChamberDto
- type FinalPrescriptionClinicalDto
- type FinalPrescriptionComplaintDto
- type FinalPrescriptionDesignDto
- type FinalPrescriptionDiagnosisDto
- type FinalPrescriptionDoctorDto
- type FinalPrescriptionExaminationDto
- type FinalPrescriptionFollowUpDto
- type FinalPrescriptionHistoryAttributesDto
- type FinalPrescriptionHistoryDto
- type FinalPrescriptionLineDto
- type FinalPrescriptionMedicationDto
- type FinalPrescriptionMetadataDto
- type FinalPrescriptionPatientDto
- type FinalPrescriptionPayloadDto
- type FinalPrescriptionProductDto
- type GetFinalPrescriptionDataDto
- type GetFinalPrescriptionReqDto
- type GetFinalPrescriptionResDto
- type GetPadSettingsBodyDto
- type GetPadSettingsReqDto
- type GetPadSettingsResDto
- type GetPatientReqDto
- type GetPatientResDto
- type ListDoctorOrganizationsItemDto
- type ListDoctorOrganizationsReqDto
- type ListDoctorOrganizationsResDto
- type ListFinalPrescriptionsItemDto
- type ListFinalPrescriptionsReqDto
- type ListFinalPrescriptionsResDto
- type ListInput
- type ListMyVerificationsHTTPInput
- type ListPatientsBodyDto
- type ListPatientsItemDto
- type ListPatientsPaginationDto
- type ListPatientsReqDto
- type ListPatientsResDto
- type ManagementHandler
- type OrganizationInput
- type PadSettingsDataDto
- type PadSettingsResourceDto
- type PadSettingsValueDto
- type PaginationInput
- type PaginationReqDto
- type PatchPatientBodyDto
- type PatchPatientReqDto
- type PatchPatientResDto
- type PatchProfileHTTPInput
- type PatientClinicalSummaryDataDto
- type PatientClinicalSummaryReqDto
- type PatientClinicalSummaryResDto
- type PatientHandler
- type PatientPathReqDto
- type PortalHandler
- type PortalOutput
- type ProfessionalCatalogListOutput
- type ProfessionalSelectionsInput
- type ProfileHandler
- type RegisterInput
- type RequestInput
- type SaveFinalPrescriptionReqDto
- type SaveFinalPrescriptionResDto
- type SavePadSettingsBodyDto
- type SavePadSettingsReqDto
- type SavePadSettingsResDto
- type SpecializationListInput
- type TokenInput
func RegisterDoctorChiefComplaintList
func RegisterDoctorChiefComplaintList(api huma.API, uc usecase.ClinicalListChiefComplaintUseCase)RegisterDoctorChiefComplaintList preserves the working route and adds cursor pagination.
func RegisterDoctorFinalPrescriptions
func RegisterDoctorFinalPrescriptions(a huma.API, uc usecase.FinalPrescriptionUseCases)RegisterDoctorFinalPrescriptions registers real final-save/read contracts; no mocked success is returned.
func RegisterDoctorHistorySuggestionList
func RegisterDoctorHistorySuggestionList(api huma.API, uc usecase.ClinicalListHistorySuggestionUseCase)RegisterDoctorHistorySuggestionList preserves the working route and adds cursor pagination.
func RegisterDoctorPadSettings
func RegisterDoctorPadSettings(a huma.API, get usecase.GetPadSettingsUseCase, save usecase.SavePadSettingsUseCase)RegisterDoctorPadSettings registers the account-level pad design operations.
func RegisterDoctorPadSuggestions
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
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.
type AuthHandler struct {
// contains filtered or unexported fields
}func NewAuthHandler
func NewAuthHandler(login *usecase.LoginUseCase, verifyAuth *usecase.VerifyAuthUseCase) *AuthHandlerNewAuthHandler constructs doctor authentication handlers.
func (*AuthHandler) RegisterHuma
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.
type AuthenticatedInput struct {
Authorization string `header:"Authorization" hidden:"true"`
}type AuthenticatedReqDto
AuthenticatedReqDto carries the bearer header separately from body data.
type AuthenticatedReqDto struct {
Authorization string `header:"Authorization" hidden:"true"`
}type ClinicalSummaryHistorySourceDto
ClinicalSummaryHistorySourceDto identifies the single finalized assessment supplying history and allergy state.
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.
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.
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.
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.
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.
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.
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.
type CreatePatientReqDto struct {
AuthenticatedReqDto
IdempotencyKey string `header:"Idempotency-Key" required:"true" minLength:"1" maxLength:"128"`
Body CreatePatientBodyDto
RawBody []byte
}func (*CreatePatientReqDto) Resolve
func (in *CreatePatientReqDto) Resolve(_ huma.Context) []errorResolve checks request-local contradictions before invoking service capabilities.
type CreatePatientResDto
CreatePatientResDto wraps a created patient in the common success envelope.
type CreatePatientResDto struct {
Body types.SuccessResponse[types.Patient]
}type CreateRequestInput
CreateRequestInput identifies the organization the doctor wants to join.
type CreateRequestInput struct {
AuthenticatedInput
Body usecase.CreateJoinRequestParams
}type DoctorAdviceGroupListItemDto
DoctorAdviceGroupListItemDto is a read-only mock group that carries its complete advice membership.
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.
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.
type DoctorAdviceGroupListResDto struct {
Body types.CursorResponse[DoctorAdviceGroupListItemDto]
}type DoctorAdviceListItemDto
DoctorAdviceListItemDto is editable catalogue text, not a patient-specific recommendation.
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.
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.
type DoctorAdviceListResDto struct {
Body types.CursorResponse[DoctorAdviceListItemDto]
}type DoctorAuthVerifyDataDto
DoctorAuthVerifyDataDto contains safe, current account and professional details.
type DoctorAuthVerifyDataDto struct {
Identity identitypublic.Account `json:"identity"`
Doctor doctorpublic.Profile `json:"doctor"`
}type DoctorAuthVerifyReqDto
DoctorAuthVerifyReqDto carries the credentials to verify doctor access.
type DoctorAuthVerifyReqDto struct {
Authorization string `header:"Authorization" hidden:"true"`
}type DoctorAuthVerifyResDto
DoctorAuthVerifyResDto wraps the verified identity and doctor profile.
type DoctorAuthVerifyResDto struct {
Body types.SuccessResponse[DoctorAuthVerifyDataDto]
}type DoctorChiefComplaintListBodyDto
DoctorChiefComplaintListBodyDto retains the legacy envelope and includes cursor pagination for authenticated catalogue reads.
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.
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.
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.
type DoctorChiefComplaintListResDto struct {
Body DoctorChiefComplaintListBodyDto
}type DoctorClinicalSuggestionQueryReqDto
DoctorClinicalSuggestionQueryReqDto uses the clinical autocomplete page size of ten.
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.
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.
type DoctorDiagnosisSuggestionListReqDto struct {
DoctorClinicalSuggestionQueryReqDto
}type DoctorDiagnosisSuggestionListResDto
DoctorDiagnosisSuggestionListResDto wraps bounded mock choices in the shared envelope.
type DoctorDiagnosisSuggestionListResDto struct {
Body types.CursorResponse[DoctorDiagnosisSuggestionListItemDto]
}type DoctorExaminationSuggestionListItemDto
DoctorExaminationSuggestionListItemDto contains a catalogue example, never a patient finding.
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.
type DoctorExaminationSuggestionListReqDto struct {
DoctorClinicalSuggestionQueryReqDto
}type DoctorExaminationSuggestionListResDto
DoctorExaminationSuggestionListResDto wraps bounded mock choices in the shared envelope.
type DoctorExaminationSuggestionListResDto struct {
Body types.CursorResponse[DoctorExaminationSuggestionListItemDto]
}type DoctorHistoryAttributesDto
DoctorHistoryAttributesDto contains optional catalog allergy classification.
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.
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.
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.
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.
type DoctorHistorySuggestionListResDto struct {
Body DoctorHistorySuggestionListBodyDto
}type DoctorInvestigationGroupInvestigationDto
DoctorInvestigationGroupInvestigationDto is an investigation display snapshot inside a group.
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.
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.
type DoctorInvestigationGroupListReqDto struct{ DoctorSuggestionQueryReqDto }type DoctorInvestigationGroupListResDto
DoctorInvestigationGroupListResDto wraps a mock investigation group page.
type DoctorInvestigationGroupListResDto struct {
Body types.CursorResponse[DoctorInvestigationGroupListItemDto]
}type DoctorInvestigationSuggestionListItemDto
DoctorInvestigationSuggestionListItemDto contains a catalogue example, never a patient finding.
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.
type DoctorInvestigationSuggestionListReqDto struct {
DoctorClinicalSuggestionQueryReqDto
}type DoctorInvestigationSuggestionListResDto
DoctorInvestigationSuggestionListResDto wraps bounded mock choices in the shared envelope.
type DoctorInvestigationSuggestionListResDto struct {
Body types.CursorResponse[DoctorInvestigationSuggestionListItemDto]
}type DoctorLoginReqDto
DoctorLoginReqDto contains credentials for a doctor identity account.
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.
type DoctorLoginResDto struct {
Body types.SuccessResponse[identitypublic.TokenPair]
}type DoctorMedicineClassDto
DoctorMedicineClassDto identifies a therapeutic class; its ID is not a generic ingredient ID.
type DoctorMedicineClassDto struct {
ID string `json:"id"`
Name string `json:"name"`
}type DoctorMedicineClassListItemDto
DoctorMedicineClassListItemDto contains a stable mock class ID and display name.
type DoctorMedicineClassListItemDto struct {
ID string `json:"id"`
Name string `json:"name"`
}type DoctorMedicineClassListReqDto
DoctorMedicineClassListReqDto selects authenticated mock therapeutic classes.
type DoctorMedicineClassListReqDto struct{ DoctorSuggestionQueryReqDto }type DoctorMedicineClassListResDto
DoctorMedicineClassListResDto returns a bounded mock class page.
type DoctorMedicineClassListResDto struct {
Body types.CursorResponse[DoctorMedicineClassListItemDto]
}type DoctorMedicineGroupListItemDto
DoctorMedicineGroupListItemDto contains a versioned, read-only mock group and all its products.
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.
type DoctorMedicineGroupListReqDto struct{ DoctorSuggestionQueryReqDto }type DoctorMedicineGroupListResDto
DoctorMedicineGroupListResDto wraps a mock group page.
type DoctorMedicineGroupListResDto struct {
Body types.CursorResponse[DoctorMedicineGroupListItemDto]
}type DoctorMedicineGroupProductDto
DoctorMedicineGroupProductDto is a product display snapshot without dosing directions.
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.
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.
type DoctorMedicineListReqDto struct {
DoctorSuggestionQueryReqDto
ClassID string `query:"class_id" maxLength:"255"`
}type DoctorMedicineListResDto
DoctorMedicineListResDto returns the mock product page and opaque continuation.
type DoctorMedicineListResDto struct {
Body types.CursorResponse[DoctorMedicineListItemDto]
}type DoctorMedicineQuickSigDto
DoctorMedicineQuickSigDto describes an explicitly selected, editable curated preset.
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.
type DoctorProfileBodyDto struct {
Message string `json:"message"`
StatusCode int `json:"status_code"`
Data DoctorProfileDto `json:"data"`
}type DoctorProfileDetailsDto
DoctorProfileDetailsDto contains doctor-owned professional details.
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.
type DoctorProfileDto struct {
identitypublic.Account
Profile DoctorProfileDetailsDto `json:"profile"`
}type DoctorProfileGetReqDto
DoctorProfileGetReqDto carries credentials for the current doctor.
type DoctorProfileGetReqDto struct {
Authorization string `header:"Authorization" hidden:"true"`
}type DoctorProfileGetResDto
DoctorProfileGetResDto contains the current doctor's identity and professional profile.
type DoctorProfileGetResDto struct{ Body DoctorProfileBodyDto }type DoctorProfilePatchResDto
DoctorProfilePatchResDto contains the persisted professional profile.
type DoctorProfilePatchResDto struct {
Body types.SuccessResponse[doctor.Profile]
}type DoctorRegisterBodyDto
DoctorRegisterBodyDto wraps registration details in the standard success response.
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.
type DoctorRegisterResDto struct{ Body DoctorRegisterBodyDto }type DoctorSuggestionQueryReqDto
DoctorSuggestionQueryReqDto supplies the shared scope, search and pagination of mock catalogue queries.
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.
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.
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.
type FinalPrescriptionCatalogEntryDto struct {
ID string `json:"id" format:"uuid"`
Name string `json:"name" maxLength:"255"`
}type FinalPrescriptionChamberDto
FinalPrescriptionChamberDto archives a professional practice location.
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.
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
func (FinalPrescriptionClinicalDto) TransformSchema(_ huma.Registry, s *huma.Schema) *huma.SchemaTransformSchema allows explicit null for an absent follow-up date.
type FinalPrescriptionComplaintDto
FinalPrescriptionComplaintDto contains clinician-entered complaint text and optional associations.
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.
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.
type FinalPrescriptionDiagnosisDto struct {
FinalPrescriptionLineDto
Certainty string `json:"certainty" enum:",provisional,confirmed,differential"`
}type FinalPrescriptionDoctorDto
FinalPrescriptionDoctorDto preserves professional identity and display selections after verification.
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.
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.
type FinalPrescriptionFollowUpDto struct {
Date string `json:"date" format:"date"`
}type FinalPrescriptionHistoryAttributesDto
FinalPrescriptionHistoryAttributesDto is patient-specific history, distinct from vocabulary classifications.
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.
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.
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.
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.
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.
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
func (FinalPrescriptionPatientDto) TransformSchema(_ huma.Registry, s *huma.Schema) *huma.SchemaTransformSchema allows explicit null for a referenced snapshot age object.
type FinalPrescriptionPayloadDto
FinalPrescriptionPayloadDto is the version-one clinical document archived by final save.
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.
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.
type GetFinalPrescriptionDataDto struct {
FinalPrescriptionMetadataDto
Payload FinalPrescriptionPayloadDto `json:"payload"`
}type GetFinalPrescriptionReqDto
GetFinalPrescriptionReqDto verifies the captured organization against the archived resource.
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.
type GetFinalPrescriptionResDto struct {
Body types.SuccessResponse[GetFinalPrescriptionDataDto]
}type GetPadSettingsBodyDto
GetPadSettingsBodyDto uses a null data member when no design has been saved.
type GetPadSettingsBodyDto struct {
Message string `json:"message"`
StatusCode int `json:"status_code"`
Data *PadSettingsDataDto `json:"data"`
}func (GetPadSettingsBodyDto) TransformSchema
func (GetPadSettingsBodyDto) TransformSchema(_ huma.Registry, s *huma.Schema) *huma.SchemaTransformSchema documents the explicit null of an account without saved settings.
type GetPadSettingsReqDto
GetPadSettingsReqDto identifies the account through credentials only; no organization is accepted.
type GetPadSettingsReqDto struct{ AuthenticatedReqDto }type GetPadSettingsResDto
GetPadSettingsResDto wraps the saved design or null.
type GetPadSettingsResDto struct{ Body GetPadSettingsBodyDto }type GetPatientReqDto
GetPatientReqDto identifies the requested patient.
type GetPatientReqDto struct{ PatientPathReqDto }type GetPatientResDto
GetPatientResDto wraps an authorized patient profile.
type GetPatientResDto struct {
Body types.SuccessResponse[types.Patient]
}type ListDoctorOrganizationsItemDto
ListDoctorOrganizationsItemDto exposes an organization assigned to the authenticated doctor.
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.
type ListDoctorOrganizationsReqDto struct{ AuthenticatedInput }type ListDoctorOrganizationsResDto
ListDoctorOrganizationsResDto wraps the doctor's assigned organizations.
type ListDoctorOrganizationsResDto struct {
Body types.SuccessResponse[[]ListDoctorOrganizationsItemDto]
}type ListFinalPrescriptionsItemDto
ListFinalPrescriptionsItemDto exposes list metadata without clinical content.
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.
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.
type ListFinalPrescriptionsResDto struct {
Body types.CursorResponse[ListFinalPrescriptionsItemDto]
}type ListInput
ListInput contains the list request parameters.
type ListInput struct {
AuthenticatedInput
PaginationInput
}type ListMyVerificationsHTTPInput
ListMyVerificationsHTTPInput filters the authenticated doctor's submissions only.
type ListMyVerificationsHTTPInput struct {
ListInput
Status string `query:"status" enum:"pending,verified,rejected"`
}type ListPatientsBodyDto
ListPatientsBodyDto contains patients and pagination in the common success envelope.
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.
type ListPatientsItemDto types.Patienttype ListPatientsPaginationDto
ListPatientsPaginationDto describes the complete filtered result and current page.
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.
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
func (input *ListPatientsReqDto) Resolve(_ huma.Context) []errorResolve rejects conflicting search parameters before invoking Patient capabilities.
type ListPatientsResDto
ListPatientsResDto wraps the organization patient list response.
type ListPatientsResDto struct{ Body ListPatientsBodyDto }type ManagementHandler
ManagementHandler wires profile edits and remaining documentation-first operations.
type ManagementHandler struct {
PatchMyDoctorProfile managementExecutor[usecase.PatchMyDoctorProfileInput, doctorpublic.Profile]
ListMyVerifications managementExecutor[usecase.ListMyVerificationsInput, adminpublic.VerificationPage]
}func NewManagementHandler
func NewManagementHandler() *ManagementHandlerNewManagementHandler creates fail-closed profile editing and remaining stub operations.
func (*ManagementHandler) RegisterHuma
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.
type OrganizationInput struct {
AuthenticatedInput
OrganizationID string `path:"organizationId" minLength:"1"`
}type PadSettingsDataDto
PadSettingsDataDto is the stored account-scoped resource.
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.
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.
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.
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.
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.
type PatchPatientBodyDto types.PatchPatientParamsfunc (PatchPatientBodyDto) TransformSchema
func (b PatchPatientBodyDto) TransformSchema(_ huma.Registry, s *huma.Schema) *huma.SchemaTransformSchema documents clearing optional enum fields.
func (*PatchPatientBodyDto) UnmarshalJSON
func (b *PatchPatientBodyDto) UnmarshalJSON(data []byte) errorUnmarshalJSON preserves field presence and explicit clearing.
type PatchPatientReqDto
PatchPatientReqDto maps the version and presence-sensitive editable body.
type PatchPatientReqDto struct {
PatientPathReqDto
Body PatchPatientBodyDto
RawBody []byte
}func (*PatchPatientReqDto) Resolve
func (in *PatchPatientReqDto) Resolve(_ huma.Context) []errorResolve validates request-local demographic and presence constraints.
type PatchPatientResDto
PatchPatientResDto wraps the current profile following a patch.
type PatchPatientResDto struct {
Body types.SuccessResponse[types.Patient]
}type PatchProfileHTTPInput
PatchProfileHTTPInput edits only supplied professional fields.
type PatchProfileHTTPInput struct {
AuthenticatedInput
Body usecase.PatchMyDoctorProfileParams
RawBody []byte
}func (*PatchProfileHTTPInput) Resolve
func (i *PatchProfileHTTPInput) Resolve(_ huma.Context) []errorResolve rejects patches with no editable field.
type PatientClinicalSummaryDataDto
PatientClinicalSummaryDataDto distinguishes missing integrations from empty authoritative records.
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
func (PatientClinicalSummaryDataDto) TransformSchema(_ huma.Registry, s *huma.Schema) *huma.SchemaTransformSchema describes a null history source when no finalized assessment exists.
type PatientClinicalSummaryReqDto
PatientClinicalSummaryReqDto requests a bounded historical panel, not an exhaustive export.
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.
type PatientClinicalSummaryResDto struct {
Body types.SuccessResponse[PatientClinicalSummaryDataDto]
}type PatientHandler
PatientHandler delegates Doctor portal operations through shared patient contracts.
type PatientHandler struct {
Create *usecase.CreatePatientUseCase
List *usecase.ListPatientsUseCase
Get *usecase.GetPatientUseCase
Patch *usecase.PatchPatientUseCase
}func (*PatientHandler) RegisterHuma
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.
type PatientPathReqDto struct {
AuthenticatedReqDto
PatientID string `path:"patientId" format:"uuid"`
}type PortalHandler
PortalHandler wires documentation-first routes to their individual TODO use cases.
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
func NewPortalHandler() *PortalHandlerNewPortalHandler creates the documentation-first portal handler.
func (*PortalHandler) RegisterHuma
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.
type PortalOutput[T any] struct{ Body T }type ProfessionalCatalogListOutput
ProfessionalCatalogListOutput contains reusable reference choices.
type ProfessionalCatalogListOutput struct {
Body types.SuccessResponse[[]doctor.CatalogEntry]
}type ProfessionalSelectionsInput
ProfessionalSelectionsInput contains authenticated profile selections.
type ProfessionalSelectionsInput struct {
AuthenticatedInput
Body usecase.ProfessionalSelections
}type ProfileHandler
ProfileHandler delivers the current doctor's profile.
type ProfileHandler struct {
// contains filtered or unexported fields
}func NewProfileHandler
func NewProfileHandler(verifyAuth *usecase.VerifyAuthUseCase) *ProfileHandlerNewProfileHandler reuses doctor session and profile verification for self-service.
func (*ProfileHandler) RegisterHuma
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.
type RegisterInput struct{ Body usecase.RegistrationParams }type RequestInput
RequestInput identifies a join request belonging to the authenticated doctor.
type RequestInput struct {
AuthenticatedInput
RequestID string `path:"requestId" minLength:"1"`
}type SaveFinalPrescriptionReqDto
SaveFinalPrescriptionReqDto captures a detached version-one document and one logical-save key.
type SaveFinalPrescriptionReqDto struct {
AuthenticatedReqDto
IdempotencyKey string `header:"Idempotency-Key" required:"true" minLength:"1" maxLength:"128"`
Body FinalPrescriptionPayloadDto
RawBody []byte
}func (*SaveFinalPrescriptionReqDto) Resolve
func (in *SaveFinalPrescriptionReqDto) Resolve(_ huma.Context) []errorResolve enforces request-local clinical consistency without inventing patient findings.
type SaveFinalPrescriptionResDto
SaveFinalPrescriptionResDto returns a persisted record identity and its detail location.
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.
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.
type SavePadSettingsReqDto struct {
AuthenticatedReqDto
Body SavePadSettingsBodyDto
RawBody []byte
}type SavePadSettingsResDto
SavePadSettingsResDto returns the stored design with its incremented revision.
type SavePadSettingsResDto struct {
Body types.SuccessResponse[PadSettingsDataDto]
}type SpecializationListInput
SpecializationListInput filters public child catalog choices.
type SpecializationListInput struct {
SpecialityID string `query:"specialityId" format:"uuid"`
}type TokenInput
TokenInput contains the token request parameters.
type TokenInput struct {
Token string `path:"token" minLength:"1" maxLength:"512" doc:"Single-use invitation token from the registration link."`
}Generated by gomarkdoc