Api reference
components.occupational_health.public.actions ¶
members ¶
update_dmst ¶
Updates the DMST data for a given occupational health profile. We also create the medical secrecy worker record ID, which will be created by the caller on the next request using this ID
See update_curriculum_laboris_job: also creates or updates jobs for the profile
Source code in components/occupational_health/internal/business_logic/actions/members/update_dmst.py
workspace_actions ¶
create_workspace_action ¶
create_workspace_action(
thesaurus_mean_id,
target_type,
target_id,
status,
creator_full_name,
prevention_type,
eta_date=None,
note=None,
commit=True,
)
Create a new WorkspaceAction for a company or a member
Returns:
| Type | Description |
|---|---|
UUID
|
The ID of the newly created AMT |
Source code in components/occupational_health/internal/business_logic/actions/workspace_actions.py
delete_workspace_action ¶
Delete an existing WorkspaceAction
Source code in components/occupational_health/internal/business_logic/actions/workspace_actions.py
update_workspace_action ¶
update_workspace_action(
workspace_action_id,
status,
prevention_type=None,
eta_date=None,
note=None,
commit=True,
)
Update an existing WorkspaceAction
Only updates the fields: status, prevention_type, eta_date, note The target and action (thesaurus_mean) cannot be changed
Source code in components/occupational_health/internal/business_logic/actions/workspace_actions.py
components.occupational_health.public.dependencies ¶
OCCUPATIONAL_HEALTH_COMPONENT_NAME
module-attribute
¶
OccupationalHealthDependency ¶
Bases: ABC
Dependency interface for occupational_health component to access country-specific functionality.
This interface abstracts away direct dependencies on country-specific components, allowing the occupational_health component to work with different country implementations.
create_profile_with_user
abstractmethod
¶
get_account_admins_profile_ids
abstractmethod
¶
get_account_id
abstractmethod
¶
get_account_id_and_siret
abstractmethod
¶
get_account_name
abstractmethod
¶
get_company_admins_profile_ids
abstractmethod
¶
get_company_display_name_and_account_id
abstractmethod
¶
Get company display name and associated account ID.
get_company_from_siret
abstractmethod
¶
get_company_ids_in_account
abstractmethod
¶
get_company_names_by_ids
abstractmethod
¶
get_company_siren
abstractmethod
¶
get_company_siret
abstractmethod
¶
Get company SIRET, optionally forcing a specific NIC.
get_global_profile_id
abstractmethod
¶
get_ssn_and_ntt_for_user
abstractmethod
¶
get_user_id_by_global_profile_mapping
abstractmethod
¶
Get global profile ID -> user ID mapping from global health profile IDs.
Source code in components/occupational_health/public/dependencies.py
get_user_id_from_global_profile_id
abstractmethod
¶
get_user_id_mapping_from_user_ids
abstractmethod
¶
Get global profile ID -> user ID mapping from user IDs.
get_work_stoppages_for_users
abstractmethod
¶
Get work stoppages for users.
Source code in components/occupational_health/public/dependencies.py
set_ssn_ntt_on_user
abstractmethod
¶
ProfileData
dataclass
¶
ProfileData(
email=None,
first_name=None,
last_name=None,
birth_date=None,
language=None,
phone_number=None,
gender=None,
)
The profile data used to create a user and profile.
get_app_dependency ¶
Retrieves the occupational_health dependency
Source code in components/occupational_health/public/dependencies.py
set_app_dependency ¶
Sets the occupational_health dependency to the app
Source code in components/occupational_health/public/dependencies.py
components.occupational_health.public.employment ¶
employment_consumer ¶
Note: Do not import local country code here, do it in the internal component after checking the country code.
occupational_health_employment_change_consumer ¶
Source code in components/occupational_health/public/employment/employment_consumer.py
requires_siret_information ¶
requires_siret_information ¶
Return whether the given account ID requires SIRET information to be provided when tracking employment movements.
Source code in components/occupational_health/public/employment/requires_siret_information.py
components.occupational_health.public.entities ¶
billing ¶
BillingStrategy ¶
CustomerAddress
dataclass
¶
CustomerData
dataclass
¶
Customer data needed for billing purposes.
InvoiceToGenerateData
dataclass
¶
InvoiceToGenerateData(
*,
billing_period,
billing_year,
contract_type,
contract_ref,
contract_yearly_price_per_employee_in_cents,
contract_needs_installment_plan_for_employees_count,
references_of_employees_affiliated_over_the_year
)
Data needed to generate an invoice for a customer.
billing_year
instance-attribute
¶
The year of the billing period. END_OF_YEAR_REGUL invoices are issued on 01/01 of the year Y+1 but will hold the original year Y in billing_year.
contract_needs_installment_plan
property
¶
Whether the contract needs an installment plan.
contract_needs_installment_plan_for_employees_count
instance-attribute
¶
contract_yearly_price_per_employee_in_cents
instance-attribute
¶
references_of_employees_affiliated_over_the_year
instance-attribute
¶
List of opaque references of all employees affiliated on this subscription/contract, during the entire year of the billing period (not just the specified billing period).
OccupationalHealthBillingPeriod ¶
Bases: AlanBaseEnum
Billing period for occupational health services.
to_validity_period ¶
The period during which we'd consider affiliations for billing purposes.
Source code in components/occupational_health/public/entities/billing.py
dmst ¶
AdministrativeProfile
dataclass
¶
AdministrativeProfile(
*,
ssn,
worker_health_status,
notes,
medical_record_sharing_consent,
medical_record_access_consent,
health_data_sharing_consent,
video_consultation_consent
)
Bases: DataClassJsonMixin
Administrative information about a member's occupational health status.
Keep in sync with: frontend/apps/medical-software/app/hooks/useProfileDmstQuery.ts
Used in the HP medical app (DMST) for the "Administrative side modal"
CurriculumLaboris
dataclass
¶
Bases: DataClassJsonMixin
Member curriculum laboris (work information): previous job, description of work, tasks, etc.
Keep in sync with: frontend/apps/medical-software/app/hooks/useProfileDmstQuery.ts
Used in the HP medical app (DMST) for the "Professional" tab
Dmst
dataclass
¶
Dmst(
*,
occupational_health_profile_id,
first_name,
last_name,
gender,
birthdate,
medical_secrecy_worker_record_id,
curriculum_laboris,
administrative_profile,
health_history=None
)
Bases: DataClassJsonMixin
Information about a member, such as their name, gender, birthdate, etc.
Keep in sync with: frontend/apps/medical-software/app/hooks/useProfileDmstQuery.ts
Used in the HP medical app (DMST)
MemberJob
dataclass
¶
MemberJob(
*,
id,
title,
start_date,
end_date,
employer,
is_past_job,
medical_secrecy_worker_job_id,
description,
working_hours,
missions,
physical_conditions,
organizational_conditions,
mental_conditions,
tools,
worn_equipment,
risks_and_advice,
exposition_notations
)
Bases: DataClassJsonMixin
Represents a single job held by a member, including employment details and duration.
Keep in sync with: frontend/apps/medical-software/app/hooks/useProfileDmstQuery.ts
Used in the HP medical app (DMST) for the "Professional" tab
OccupationalMedicalHistory
dataclass
¶
OccupationalMedicalHistoryType ¶
health_history ¶
Health data entities for occupational health worker medical records.
These entities correspond to the TypeScript interfaces in: frontend/apps/medical-software/app/hooks/types.ts
NOTE: This is a duplicate of components.medical_secrecy.internal.entities.occupational_health_worker_medical_record_health_history to avoid cross-component dependencies. Keep in sync manually. TODO: @david.barthelemy: clean this after talking with Alexandre and Mickael
AlcoholStatus ¶
AllergyItem
dataclass
¶
Bases: DataClassJsonMixin
Allergy item.
Corresponds to AllergyItem TypeScript interface.
AllergyStatus ¶
EyeHealthItem
dataclass
¶
Bases: DataClassJsonMixin
Corresponds to EyeHealthItem TypeScript interface.
FamilyHistoryItem
dataclass
¶
Bases: DataClassJsonMixin
Family history item.
Corresponds to FamilyHistoryItem TypeScript interface.
FamilyHistoryMember
dataclass
¶
FamilyStatus ¶
Bases: AlanBaseEnum
Family member status.
HealthHistory
dataclass
¶
HealthHistory(
*,
medical_surgical_history=list(),
allergies=list(),
treatment=None,
vaccine=None,
family_history=list(),
lifestyle=None,
transport_mode=None,
personal_situation=None,
gynecological_follow_up=None,
gynecological_observation=None,
contraceptives=None,
eye_health=None,
medical_observation=None
)
Bases: DataClassJsonMixin
Health history for occupational health worker medical record.
This dataclass contains all health-related information that needs to be encrypted and stored in the OccupationalHealthWorkerMedicalRecord.health_history field.
All fields correspond to the forms defined in: frontend/apps/medical-software/app/pages/MemberHealthTab.tsx
medical_surgical_history
class-attribute
instance-attribute
¶
LifestyleItem
dataclass
¶
LifestyleItem(
*,
alcohol_status=None,
alcohol_observation=None,
smoking_status=None,
smoking_observation=None,
other_addictive_behaviors=None,
physical_activity_status=None,
physical_activity_observations=None,
food=None,
sleep=None,
lifestyle_observations=None
)
Bases: DataClassJsonMixin
Lifestyle information.
Corresponds to LifestyleItem TypeScript interface.
physical_activity_observations
class-attribute
instance-attribute
¶
LivingStatus ¶
MedicalSurgicalHistoryItem
dataclass
¶
Bases: DataClassJsonMixin
Medical and surgical history item.
Corresponds to MedicalSurgicalHistoryItem TypeScript interface.
MedicalSurgicalHistoryStatus ¶
Bases: AlanBaseEnum
Status of a medical or surgical history item.
PersonalSituationItem
dataclass
¶
PhysicalActivityStatus ¶
Bases: AlanBaseEnum
Physical activity status.
SmokingStatus ¶
Bases: AlanBaseEnum
Smoking status.
TransportModeItem
dataclass
¶
TreatmentItem
dataclass
¶
Bases: DataClassJsonMixin
Treatment item.
Corresponds to TreatmentItem TypeScript interface.
VaccineItem
dataclass
¶
member_info ¶
MemberInfo
dataclass
¶
MemberInfo(
*,
occupational_health_profile_id,
user_id,
member_first_name,
member_last_name,
member_gender,
member_birthdate
)
Bases: DataClassJsonMixin
Information about a member, such as their name, gender, birthdate, etc.
Note: we'll be using other structures for the rest of the data e.g. MemberActivity, etc.
Used in the HP medical app.
thesaurus ¶
ThesaurusMean
dataclass
¶
ThesaurusOccupationalExposure
dataclass
¶
ThesaurusOccupationalExposure(
*,
notation,
label,
dc_type,
status,
created_at,
version,
line_number,
risk_category,
parent_notation,
class_label=None,
subclass_label=None,
class_notation=None,
subclass_notation=None
)
Bases: DataClassJsonMixin
A TEP (Thésaurus des Expositions Professionnelles) exposition entry.
visit ¶
VisitInfo
dataclass
¶
VisitInfo(
*,
visit_id,
member_first_name,
member_last_name,
member_gender,
member_birthdate,
visit_date,
visit_type,
health_professional_name,
health_professional_id,
visit_status,
occupational_health_profile_id
)
Bases: DataClassJsonMixin
Information about a visit scheduled for a specific date.
Used in the HP medical app.
workspace_action ¶
WorkspaceAction
dataclass
¶
WorkspaceAction(
id,
title,
target_type,
status,
company_name=None,
members_count=None,
member_full_name=None,
job_title=None,
health_professional_fullname=None,
profile_id=None,
account_id=None,
eta_date=None,
prevention_type=None,
note=None,
)
Bases: DataClassJsonMixin
Represents a WorkspaceAction (an AMT in France) in the context of occupational health.
health_professional_fullname
class-attribute
instance-attribute
¶
WorkspaceActionPreventionType ¶
WorkspaceActionStatus ¶
components.occupational_health.public.enums ¶
components.occupational_health.public.events ¶
subscription ¶
subscribe_to_events ¶
All event subscriptions for the occupational health component should be done here.
Source code in components/occupational_health/public/events/subscription.py
components.occupational_health.public.marmot ¶
actions ¶
Actions for use in Marmot controllers.
AffiliationRequest
dataclass
¶
affiliate_multiple_members ¶
Affiliate multiple members to Prévenir in a single transaction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
UUID
|
The account ID to affiliate members to |
required |
affiliations
|
list[AffiliationRequest]
|
List of tuples (user_id, start_date) |
required |
Returns:
| Type | Description |
|---|---|
list[UUID]
|
List of affiliation IDs |
Source code in components/occupational_health/internal/business_logic/actions/affiliation_tool.py
affiliate_new_member_for_marmot ¶
affiliate_new_member_for_marmot(
*,
user_id,
account_id,
start_date,
end_date=None,
actor_user_id=None
)
Affiliate a new member to occupational health.
Source code in components/occupational_health/public/marmot/actions.py
cancel_affiliation_for_marmot ¶
Cancel an affiliation for a profile.
This is a wrapper around cancel_affiliation that adds logging.
Source code in components/occupational_health/public/marmot/actions.py
create_contract ¶
Source code in components/occupational_health/internal/business_logic/contracting/actions.py
entities ¶
AccountForMarmot
dataclass
¶
AffiliationMovementForMarmot
dataclass
¶
AffiliationMovementForMarmot(
movement_id,
account_id,
profile_id,
movement_type,
date_of_movement,
first_name,
last_name,
birth_date,
created_at,
decision_id,
company_id,
company_name,
company_name_enriched_from_dsn,
)
Bases: DataClassJsonMixin
Represent an affiliation movement for display in Marmot
ContractInfo
dataclass
¶
MemberToAffiliate
dataclass
¶
MemberToAffiliate(
row_index,
first_name,
last_name,
birthdate,
ssn,
proposed_user_id,
proposed_user_name,
proposed_birthdate,
matched_name,
matched_birthdate,
matching_result,
affiliations,
employments,
target_start_date,
extra_data,
)
Bases: DataClassJsonMixin
Result of matching a spreadsheet row.
OccupationalHealthAffiliationDecisionForMarmot
dataclass
¶
OccupationalHealthAffiliationDecisionForMarmot(
id,
created_at,
decision,
employment_change_payload,
core_employment_id,
rule_id,
rule_name,
)
Bases: DataClassJsonMixin
Affiliation decision data for display in Marmot.
OccupationalHealthProfileData
dataclass
¶
OccupationalHealthProfileData(
profile_id,
visits,
affiliations,
affiliation_decisions,
next_visit_result,
)
Bases: DataClassJsonMixin
All occupational health data for a profile
OccupationalHealthVisitForMarmot
dataclass
¶
OccupationalHealthVisitForMarmot(
id,
visit_date,
visit_type,
visit_setup,
managed_by_prevenir,
took_place,
cancellation_reason,
work_stoppage_reason,
health_professional_first_name,
health_professional_last_name,
)
Bases: DataClassJsonMixin
Represent a visit for display in Marmot
enums ¶
MovementType ¶
Bases: AlanBaseEnum
The recorded movement: either an affiliation, or a termination, or a cancellation.
Transfers are composed by a termination and an affiliation, if they moved between two distinct accounts.
queries ¶
Queries for use in Marmot controllers.
get_accounts_list_for_marmot ¶
Return the list of accounts with occupational health contracts for Marmot.
Source code in components/occupational_health/public/marmot/queries.py
get_affiliated_members_for_marmot ¶
Return the list of affiliated members (including past ones) for display in Marmot.
Source code in components/occupational_health/public/marmot/queries.py
get_affiliation_decisions_for_marmot ¶
get_affiliation_decisions_for_marmot(
profile_service,
account_id,
decision=None,
not_older_than=None,
)
Return the list of affiliation decisions, optionally filtered by decision type and date.
Source code in components/occupational_health/public/marmot/queries.py
get_contract_info_for_account ¶
Get contract information for an account.
Source code in components/occupational_health/internal/business_logic/queries/affiliation_tool.py
get_occupational_health_profile_data_for_marmot ¶
Return all occupational health data for a profile, for display in Marmot.
Source code in components/occupational_health/public/marmot/queries.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | |
get_recent_affiliation_movements ¶
Return the list of affiliation decisions made since the given date for the given account.
Source code in components/occupational_health/public/marmot/queries.py
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 | |
parse_and_match_spreadsheet ¶
Parse spreadsheet data and return matching results (members that will could affiliate)
Source code in components/occupational_health/internal/business_logic/queries/affiliation_tool.py
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | |
components.occupational_health.public.queries ¶
billing ¶
Set of queries used by the Billing stack.
See https://github.com/alan-eu/Topics/discussions/30344?sort=old#discussioncomment-14080373 ⧉
ContractRefNotFound ¶
Bases: Exception
A contract reference was not found.
UnableToDetermineCustomerToBill ¶
Bases: Exception
Unable to determine which customer to bill.
build_invoices_data_for_period ¶
Build the data required to generate all invoices for the given billing period and invoice year.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
billing_period
|
OccupationalHealthBillingPeriod
|
The billing period to build data for. |
required |
billing_year
|
int
|
The year of the billing period to build data for. |
required |
The data is not guaranteed to be stable over time for past billing periods, as retroactive affiliation changes can occur.
Returns:
| Type | Description |
|---|---|
list[InvoiceToGenerateData]
|
list[InvoiceToGenerateData]: The data about all invoices to generate for the given period. |
Source code in components/occupational_health/public/queries/billing.py
build_invoices_data_for_period_and_account ¶
Build the data required to generate all invoices for the given billing period, invoice year and account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
billing_period
|
OccupationalHealthBillingPeriod
|
The billing period to build data for. |
required |
billing_year
|
int
|
The year of the billing period to build data for. |
required |
account_id
|
UUID
|
The account ID to build invoices for. |
required |
The data is not guaranteed to be stable over time for past billing periods, as retroactive affiliation changes can occur.
Returns:
| Type | Description |
|---|---|
list[InvoiceToGenerateData]
|
list[InvoiceToGenerateData]: The data about all invoices to generate for the given period. |
Source code in components/occupational_health/public/queries/billing.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | |
check_data ¶
Temporary function to display the data produced by Occupational Health.
Source code in components/occupational_health/public/queries/billing.py
get_customer_data ¶
Fetch customer data for the billing system.
Until we decide how to store this customer data (on the Billing side?), here is a query to serve it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
contract_ref
|
str
|
The contract reference to look up customer data for |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CustomerData |
CustomerData
|
The customer data for the given contract reference |
Raises:
| Type | Description |
|---|---|
ContractRefNotFound
|
If the contract reference is not found in the customer data mapping |
Source code in components/occupational_health/public/queries/billing.py
has_active_occupational_health_contract ¶
has_active_occupational_health_contract ¶
Return whether the given account ID has an active occupational health contract at the moment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
UUID
|
The ID of the account to check. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the account has an active occupational health contract, False otherwise. |
Source code in components/occupational_health/public/queries/has_active_occupational_health_contract.py
is_currently_affiliated_to_prevenir ¶
is_currently_affiliated_to_occupational_health ¶
Check if the user is currently affiliated to Prevenir.
Will create a OccupationalHealthProfile if it doesn't exist, hence the commit parameter.
Returns True if the user has active affiliations, otherwise False.
Source code in components/occupational_health/public/queries/is_currently_affiliated_to_prevenir.py
profiles ¶
get_profile_dmst ¶
Returns the member information for a given occupational health profile ID.
Source code in components/occupational_health/internal/business_logic/queries/profiles/profiles.py
search ¶
get_search_results ¶
Search for members and companies based on provided search input.
Note
The function currently only searches for members by full name. Company search and additional member fields (job_title, company, risk_category) are planned to be implemented.
Source code in components/occupational_health/internal/business_logic/queries/search/search.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | |
strategy_rules ¶
AffiliationStrategyRuleForMarmot
dataclass
¶
AffiliationStrategyRuleForMarmot(
rule_id,
account_id,
name,
company_id,
company_name,
siret,
company_name_from_siret,
is_missing_siret,
action,
created_at,
updated_at,
)
Bases: DataClassJsonMixin
Affiliation strategy rules displayed in Marmot.
get_affiliation_strategy_rules_for_account ¶
Get all affiliation strategy rules for a given account.
Source code in components/occupational_health/public/queries/strategy_rules.py
visits ¶
get_all_visits_for_member ¶
Get all visits for a specific member
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
profile_service
|
ProfileService
|
The profile service for fetching member information |
required |
occupational_health_profile_id
|
str
|
Optional filter by occupational health profile ID |
required |
Returns:
| Type | Description |
|---|---|
list[VisitInfo]
|
List[VisitInfo]: List of visits scheduled for the specified date |
Source code in components/occupational_health/internal/business_logic/queries/visits/medical_app.py
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | |
get_visits ¶
Get all visits scheduled for a specific date. If no date is provided, return visits for today.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
profile_service
|
ProfileService
|
The profile service for fetching member information |
required |
on_date
|
date | None
|
The date to fetch visits for. If None, uses today's date. |
required |
Returns:
| Type | Description |
|---|---|
list[VisitInfo]
|
List[VisitInfo]: List of visits scheduled for the specified date |
Source code in components/occupational_health/internal/business_logic/queries/visits/medical_app.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | |
workspace_actions ¶
get_all_workspace_actions ¶
Source code in components/occupational_health/internal/business_logic/queries/workspace_actions/workspace_actions.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
components.occupational_health.public.thesaurus ¶
expositions ¶
queries ¶
get_expositions ¶
Return the exposition data matching the given notations
Source code in components/occupational_health/internal/thesaurus/expositions/queries.py
search_expositions ¶
Return the exposition data matching the given search input (case-insensitive and accent-insensitive)
Note: adds the class and subclass labels to the exposition objects
Source code in components/occupational_health/internal/thesaurus/expositions/queries.py
terminologies ¶
queries ¶
search_terminologies ¶
Return the terminology data matching the given search input (case-insensitive and accent-insensitive)