Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# Set the default behavior, in case people don't have core.autocrlf set.
text eol=crlf
# Ensure epilog files always use CRLF line endings
*.epilogscript text eol=crlf
*.epilogbuild text eol=crlf
*.metadata text eol=crlf
*.hdf text eol=crlf
*.hrf text eol=crlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Base Relations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

berlitz(claim.first_hospital_can_provide_emergency_services(C, yes),
"the first hospital to which the patient in $C$ was taken can provide the emergency services that the patient needs.")
berlitz(claim.first_hospital_can_provide_emergency_services(C, no),
"the first hospital to which the patient in $C$ was taken cannot provide the emergency services that the patient needs.")

berlitz(claim.ambulance_service_from_one_hospital_to_another(C, yes),
"the ambulance service for the patient in $C$ was from one hospital to another.")
berlitz(claim.ambulance_service_from_one_hospital_to_another(C, no),
"the ambulance service for the patient in $C$ was not from one hospital to another.")

berlitz(claim.is_the_only_safe_way_to_transport_you(C, yes),
"the type of transportation used to transport the patient in $C$ was the only safe way to transport the patient.")
berlitz(claim.is_the_only_safe_way_to_transport_you(C, no),
"the type of transportation used to transport the patient in $C$ was not the only safe way to transport the patient.")

berlitz(claim.type_of_non_emergency_transportation(C, T),
"the patient in $C$ was transported by a $T$")

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Defined Relations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

berlitz(is_covered_emergency_ambulance_service(C),
"$C$ is a covered emergency ambulance service")

berlitz(is_covered_non_emergency_ambulance_service(C),
"$C$ is a covered non-emergency ambulance service")

berlitz(is_covered_type_of_non_emergency_transportation(C),
"the type of transportation used to transport the patient in $C$ is a covered type of emergency transportation")

berlitz(ambulance_service(S),
"$S$ is an ambulance service")
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Base Relations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%% Claim relations %%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%% Claim type-generic %%%%%%%%%%%%%%%%%%%%%%%
berlitz(claim.patient(C, P),
"the patient in $C$ is $P$")

% berlitz(claim.quarter_enrolled_stanford_2024_2025(C, Q),
% "$Q$ is the first quarter that the patient in $C$ was enrolled in Stanford in the 2023-2024 academic year")


berlitz(claim.date_service_received(C, D),
"the service in $C$ was received on $D$")

berlitz(claim.service_type(C, S),
"the service in $C$ has type $S$")

berlitz(claim.precertification_received(C, yes),
"precertification was received for the service in $C$")
berlitz(claim.precertification_received(C, no),
"precertification was not received for the service in $C$")


% berlitz(claim.waived_cardinal_care(C, yes),
% "Cardinal Care was waived")
% berlitz(claim.waived_cardinal_care(C, no),
% "Cardinal Care was not waived")


berlitz(claim.location_service_received(C, L),
"the service in $C$ was received at $L$")


berlitz(claim.service_available_at_tier_one_or_two_location(C, yes),
"the service in $C$ is available at a tier one or tier two location")
berlitz(claim.service_available_at_tier_one_or_two_location(C, no),
"the service in $C$ is not available at a tier one or tier two location")


%%%%%%%%%%%%%%%%%%%%%%%%%%% General Exclusions %%%%%%%%%%%%%%%%%%%%%%%%%%%

% berlitz(claim.reception_of_service_or_supplies_resulted_from_service_in_armed_forces(C, yes),
% "the service in $C$ was received from a provider as a result of an injury sustained, or illness contracted, while in the service of the armed forces of any country")
% berlitz(claim.reception_of_service_or_supplies_resulted_from_service_in_armed_forces(C, no),
% "the service in $C$ was not received from a provider as a result of an injury sustained, or illness contracted, while in the service of the armed forces of any country")

% berlitz(claim.service_or_supplies_provided_by_provider_acting_beyond_scope_of_legal_authority(C, yes),
% "the service in $C$ was provided by a provider that was acting beyond the scope of its legal authority, (I.e. the provider was not licensed/certified to provide the health care services they provided to the patient)")
% berlitz(claim.service_or_supplies_provided_by_provider_acting_beyond_scope_of_legal_authority(C, no),
% "the service in $C$ was not provided by a provider that was acting beyond the scope of its legal authority, (I.e. the provider was licensed/certified to provide the health care services they provided to the patient)")

% berlitz(claim.service_is_clinical_trial_therapy_experimental_investigational(C, yes),
% "the service in $C$ was an experimental or investigational clinical trial therapy")
% berlitz(claim.service_is_clinical_trial_therapy_experimental_investigational(C, no),
% "the service in $C$ was not an experimental or investigational clinical trial therapy")

% berlitz(claim.service_is_genetic_care(C, yes),
% "the service in $C$ altered the body's genes, genetic make-up, or the expression of the body's genes")
% berlitz(claim.service_is_genetic_care(C, no),
% "the service in $C$ did not alter the body's genes, genetic make-up, or the expression of the body's genes")

% berlitz(claim.service_for_correction_of_congenital_birth_defects(C, yes),
% "the service in $C$ was for the correction of congenital birth defects")
% berlitz(claim.service_for_correction_of_congenital_birth_defects(C, no),
% "the service in $C$ was not for the correction of congenital birth defects")

% berlitz(claim.payment_for_service_made_for_judgment_settlement(C, yes),
% "the payment for the service in $C$ was made as a judgment or settlement by any person deemed responsible for an injury or illness, or by their insurers")
% berlitz(claim.payment_for_service_made_for_judgment_settlement(C, no),
% "the payment for the service in $C$ was not made as a judgment or settlement by any person deemed responsible for an injury or illness, or by their insurers")

% berlitz(claim.service_provided_by_family_member(C, yes),
% "the service in $C$ was provided by a spouse, domestic partner, civil union partner, parent, child, step-child, brother, sister, in-law or any household member of the patient")
% berlitz(claim.service_provided_by_family_member(C, no),
% "the service in $C$ was not provided by a spouse, domestic partner, civil union partner, parent, child, step-child, brother, sister, in-law or any household member of the patient")

% berlitz(claim.treated_in_facility_owned_or_operated_by_governmental_entity(C, yes),
% "the service in $C$ was received in a facility owned or operated by any federal, state, or other governmental entity")
% berlitz(claim.treated_in_facility_owned_or_operated_by_governmental_entity(C, no),
% "the service in $C$ was not received in a facility owned or operated by any federal, state, or other governmental entity")


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% builtins
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

berlitz(member(E, L),
"$E$ is one of $L$")

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Defined Relations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% berlitz(covered_under_policy(C, P, T),
% "$C$ is covered under $P$ which is an instance of $T$")


% berlitz(policy_in_effect(C, P),
% "$P$ is in effect during $C$")


berlitz(service_received_at_valid_provider(C),
"the service in $C$ was received at a valid provider")

berlitz(meets_additional_eligibility_requirements_if_present(C),
"$C$ meets additional eligibility requirements, if there are any")


berlitz(medically_necessary_service(C),
"the service received in $C$ is medically necessary")


berlitz(precertified_if_necessary(C),
"the service in $C$ was precertified, if necessary")


berlitz(beyond_limits(C),
"the service in $C$ is beyond limits on coverage")


berlitz(general_exclusion_applies(C),
"one or more general exclusions apply to $C$")


% berlitz(policy_in_effect_for_claim(POL, C),
% "$POL$ is in effect for $C$")


berlitz(date_between_dates_incl(ServiceDate, StartDate, EndDate),
"$ServiceDate$ is between $StartDate$ and $EndDate$, inclusive")


berlitz(covered_under_cardinal_care_24_25_benefit(C, B),
"$C$ is covered under the Cardinal Care 2024-2025 benefit $B$")

berlitz(patient_age_at_time_of_service(C, A),
"the age of the patient in $C$ at the time of the service is $A$")

berlitz(patient_age_on_date(DOB, D, A),
"the age of the patient with date of birth $DOB$ on $D$ is $A$")

berlitz(age_at_time_of_service(C, P, A),
"the age of $P$ at the time of the service in $C$ is $A$")

berlitz(age_on_date(P, D, A),
"the age of $P$ on $D$ is $A$")

berlitz(datetimetotimestamp(D, T, S),
"the timestamp for $D$ and $T$ is $S$")


berlitz(requires_precertification(S),
"$S$ requires precertification")


berlitz(not_yet_birthday_delta(M, D, DOBM, DOBD, -1),
"on the date $M$ $D$ it is not yet the person's birthday")
berlitz(not_yet_birthday_delta(M, D, DOBM, DOBD, 0),
"on the date $M$ $D$ it is not before the person's birthday")

berlitz(n_months_diff(D1, D2, N),
"the number of months between $D1$ and $D2$ is $N$")

% Note: D1 and D2 are integers. This Berlitz entry is meant to give context around this relation's usage, if not its formal definition.
berlitz(not_yet_day_of_month_delta(D1, D2, 0),
"the day of the month in the first date is at least that of the second date")
berlitz(not_yet_day_of_month_delta(D1, D2, -1),
"the day of the month in the first date is less than that of the second date")


berlitz(is_preventive_care_service(S),
"$S$ is a preventive care service")
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@

%%%%%%%%%%%%%%%%%%%%%%%%%%% Policy relations %%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% type(policy, class)
%%% attribute(policy, policy.type)
%%% attribute(policy, policy.insuree)

%%% type(policy.type, attributerelation)
%%% domain(policy.type, policy)
%%% codomain(policy.type, product)
%%% unique(policy.type, yes)
%%% total(policy.type, yes)

%%% type(policy.insuree, attributerelation)
%%% domain(policy.insuree, policy)
%%% codomain(policy.insuree, person)
%%% unique(policy.insuree, no)
%%% total(policy.insuree, yes)


%%%%%%%%%%%%%%%%%%%%%%%%%%% Person relations %%%%%%%%%%%%%%%%%%%%%%%%%%%
% type(person, class)
% attribute(person, person.dob)

% type(person.dob, attributerelation)
% domain(person.dob, person)
% codomain(person.dob, date)
% unique(person.dob, yes)
% total(person.dob, yes)


%%%%%%%%%%%%%%%%%%%%%%%%%%% Claim relations %%%%%%%%%%%%%%%%%%%%%%%%%%%
type(claim, class)

%%%%%%%%%%%%%%%%%%%%%%% Claim type-generic %%%%%%%%%%%%%%%%%%%%%%%
%attribute(ambulance_service_coverage, claim.patient)
attribute(ambulance_service_coverage, claim.patient_dob)
%%% attribute(ambulance_service_coverage, claim.quarter_enrolled_stanford_2024_2025)
attribute(ambulance_service_coverage, claim.date_service_received)
attribute(ambulance_service_coverage, claim.service_type)
attribute(ambulance_service_coverage, claim.precertification_received)
%%% attribute(ambulance_service_coverage, claim.waived_cardinal_care)
attribute(ambulance_service_coverage, claim.location_service_received)
attribute(ambulance_service_coverage, claim.service_available_at_tier_one_or_two_location)

% type(claim.patient, attributerelation)
% domain(claim.patient, ambulance_service_coverage)
% codomain(claim.patient, person)
% unique(claim.patient, yes)
% total(claim.patient, yes)

type(claim.patient_dob, attributerelation)
domain(claim.patient_dob, ambulance_service_coverage)
codomain(claim.patient_dob, date)
unique(claim.patient_dob, yes)
total(claim.patient_dob, yes)
changestyle(claim.patient_dob,datestyle)


%%% type(claim.quarter_enrolled_stanford_2024_2025, attributerelation)
%%% domain(claim.quarter_enrolled_stanford_2024_2025, ambulance_service_coverage)
%%% codomain(claim.quarter_enrolled_stanford_2024_2025, quarter_2023_2024)
%%% unique(claim.quarter_enrolled_stanford_2024_2025, yes)
%%% total(claim.quarter_enrolled_stanford_2024_2025, no)

type(claim.date_service_received, attributerelation)
domain(claim.date_service_received, ambulance_service_coverage)
codomain(claim.date_service_received, date)
unique(claim.date_service_received, yes)
total(claim.date_service_received, yes)
changestyle(claim.date_service_received,datestyle)

type(claim.service_type, attributerelation)
domain(claim.service_type, ambulance_service_coverage)
codomain(claim.service_type, cardinal_care_2024_2025_service)
unique(claim.service_type, yes)
total(claim.service_type, yes)
changestyle(claim.service_type,selector)

type(claim.precertification_received, attributerelation)
domain(claim.precertification_received, ambulance_service_coverage)
codomain(claim.precertification_received, boolean)
unique(claim.precertification_received, yes)
total(claim.precertification_received, yes)
changestyle(claim.precertification_received,selector)

%%% type(claim.waived_cardinal_care, attributerelation)
%%% domain(claim.waived_cardinal_care, ambulance_service_coverage)
%%% codomain(claim.waived_cardinal_care, boolean)
%%% unique(claim.waived_cardinal_care, yes)
%%% total(claim.waived_cardinal_care, yes)

type(claim.location_service_received, attributerelation)
domain(claim.location_service_received, ambulance_service_coverage)
codomain(claim.location_service_received, cardinal_care_2024_2025_location)
unique(claim.location_service_received, yes)
total(claim.location_service_received, yes)
changestyle(claim.location_service_received,selector)

type(claim.service_available_at_tier_one_or_two_location, attributerelation)
domain(claim.service_available_at_tier_one_or_two_location, ambulance_service_coverage)
codomain(claim.service_available_at_tier_one_or_two_location, boolean)
unique(claim.service_available_at_tier_one_or_two_location, yes)
total(claim.service_available_at_tier_one_or_two_location, yes)
changestyle(claim.service_available_at_tier_one_or_two_location,selector)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Classes without attributes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

type(boolean,class)
type(person,class)
type(product,class)
type(date,class)
type(number,class)

type(quarter_2024_2025, class)
type(cardinal_care_2024_2025_location, class)
type(cardinal_care_2024_2025_service, class)
type(ambulance_service_coverage, class)
superclass(ambulance_service_coverage, claim)
attribute(ambulance_service_coverage, claim.first_hospital_can_provide_emergency_services)
attribute(ambulance_service_coverage, claim.ambulance_service_from_one_hospital_to_another)
attribute(ambulance_service_coverage, claim.non_emergency_transport_is_precertified)
attribute(ambulance_service_coverage, claim.is_the_only_safe_way_to_transport_you)
attribute(ambulance_service_coverage, claim.type_of_non_emergency_transportation)

type(claim.first_hospital_can_provide_emergency_services, attributerelation)
domain(claim.first_hospital_can_provide_emergency_services, claim)
codomain(claim.first_hospital_can_provide_emergency_services, boolean)
unique(claim.first_hospital_can_provide_emergency_services, yes)
total(claim.first_hospital_can_provide_emergency_services, no)
changestyle(claim.first_hospital_can_provide_emergency_services, selector)

type(claim.ambulance_service_from_one_hospital_to_another, attributerelation)
domain(claim.ambulance_service_from_one_hospital_to_another, claim)
codomain(claim.ambulance_service_from_one_hospital_to_another, boolean)
unique(claim.ambulance_service_from_one_hospital_to_another, yes)
total(claim.ambulance_service_from_one_hospital_to_another, no)
changestyle(claim.ambulance_service_from_one_hospital_to_another, selector)

type(claim.is_the_only_safe_way_to_transport_you, attributerelation)
domain(claim.is_the_only_safe_way_to_transport_you, claim)
codomain(claim.is_the_only_safe_way_to_transport_you, boolean)
unique(claim.is_the_only_safe_way_to_transport_you, yes)
total(claim.is_the_only_safe_way_to_transport_you, no)
changestyle(claim.is_the_only_safe_way_to_transport_you, selector)

type(claim.type_of_non_emergency_transportation, attributerelation)
domain(claim.type_of_non_emergency_transportation, claim)
codomain(claim.type_of_non_emergency_transportation, type_of_non_emergency_transportation)
unique(claim.type_of_non_emergency_transportation, yes)
total(claim.type_of_non_emergency_transportation, no)
changestyle(claim.type_of_non_emergency_transportation, selector)

type(type_of_non_emergency_transportation, class)
%%%%%%%%%%%%%%%%%%%%%%% General Exclusions %%%%%%%%%%%%%%%%%%%%%%%
attribute(ambulance_service_coverage, claim.exclusions)

type(claim.exclusions, attributerelation)
domain(claim.exclusions, ambulance_service_coverage)
codomain(claim.exclusions, general_exclusion)
unique(claim.exclusions, yes)
total(claim.exclusions, yes)
changestyle(claim.exclusions, checkboxfield)
Loading