FreeMED. LedgerSummary | | | | | Provide an “aging summary” (with number of claims and amount due) for a range of agings, grouped by patient. | | Determine if the selected patient is in collections status (>180 days unpaid). | | Get a list of ledger items from the system | | Moves a procedure to the next available coverage. | | Determine if there is another coverage that this should be moved to, based on the current coverage, and whether it should be moved to the patient or is not able to be billed any further | | Set a procedure to be rebilled at the next billing, moving it to be associated to the proper coverage. | | Post an adjustment for the specified procedure. | | Post a copay for the specified procedure. | | Post a deductable for the specified procedure. | | Post a fee adjustment for the specified procedure. | | Posts payment record based on passed data. | | | | | | Posts a credit card payment. | | Post a write-off of a particular type to the system for the specified procedure. | | Adds an “unpostable” sum to the global claim log. | | Write off an array of items | | Look up a patient by a procedure id | | Internal helper function to convert SQL queries into arrays of associative arrays. |
aging_report_qualifiedfunction aging_report_qualified ( | $criteria | ) |
|
Provide an “aging summary” (with number of claims and amount due) for a range of agings, grouped by patient. This function is primarily used by the accounts receivable module, but could conceivably be used by other financial parts of FreeMED. Parameters$criteria | Associative array of criteria types as keys and parameters as values. |
ReturnsArray of associative arrays containing aging information.
collection_warningfunction collection_warning ( | $pid | ) |
|
Determine if the selected patient is in collections status (>180 days unpaid). ParametersReturnsAmount in collections, or a testing false value (0)?
get_listGet a list of ledger items from the system ReturnsArray of associative arrays, containing ledger records.
move_to_next_coveragefunction move_to_next_coverage ( | $proc, | | | | $disallow | = | NULL | ) |
|
Moves a procedure to the next available coverage. Parameters$proc | Procedure id key | $disallow | (optional) Disallowment amount that cannot be passed to the patient if coverages run out. |
ReturnsBoolean, successful See Alsonext_coverage
next_coveragefunction next_coverage ( | $proc | ) |
|
Determine if there is another coverage that this should be moved to, based on the current coverage, and whether it should be moved to the patient or is not able to be billed any further ParametersReturnsCoverage type for next round of coverage, 0 if the rest of the bill has to be handled by the patient, or -1 if the rest of the bill is unbillable.
queue_for_rebillfunction queue_for_rebill ( | $proc, | | | | $type, | | | | $disallow | = | NULL | ) |
|
Set a procedure to be rebilled at the next billing, moving it to be associated to the proper coverage. Parameters$proc | Procedure id key | $type | Coverage number (0 - 4) | $disallow | (optional) Disallowment amount that cannot be passed to the patient. |
ReturnsBoolean, successful
post_adjustmentfunction post_adjustment ( | $procedure, | | | | $amount, | | | | $comment | = | '' | ) |
|
Post an adjustment for the specified procedure. Parameters$procedure | Procedure id key | $amount | Amount of the copay as a positive number | $comment | (optional) Text comment for the record. Defaults to a null string. |
ReturnsBoolean, if successful
post_copayfunction post_copay ( | $procedure, | | | | $amount, | | | | $comment | = | '' | ) |
|
Post a copay for the specified procedure. Parameters$procedure | Procedure id key | $amount | Amount of the copay as a positive number | $comment | (optional) Text comment for the record. Defaults to a null string. |
ReturnsBoolean, if successful
post_deductablefunction post_deductable ( | $procedure, | | | | $amount, | | | | $comment | = | '' | ) |
|
Post a deductable for the specified procedure. Parameters$procedure | Procedure id key | $amount | Amount of the deductable, as a positive number | $comment | (optional) Text comment for the record. Defaults to a null string. |
ReturnsBoolean, if successful
post_fee_adjustmentfunction post_fee_adjustment ( | $procedure, | | | | $coverage, | | | | $amount, | | | | $comment | = | '' | ) |
|
Post a fee adjustment for the specified procedure. Parameters$procedure | Procedure id key | $coverage | Coverage id key | $amount | Amount of the fee adjustment | $comment | (optional) Text comment for the record. Defaults to a null string. |
ReturnsBoolean, if successful
post_paymentfunction post_payment ( | $data | ) |
|
Posts payment record based on passed data. Parameters$data | Associative array containing information passed to the ledger. |
ReturnsBoolean, if successful. See Alsopost_payment_cash post_payment_check
post_payment_cashfunction post_payment_cash ( | $procedure, | | $coverage, | | $amount, | | $comment | ) |
|
Posts a cash payment. This is a wrapper for post_payment. Parameters$procedure | Procedure id number | $coverage | Coverage that check is related to | $amount | Numeric amount of the check | $comment | Text comment to be attached to the ledger |
ReturnsBoolean, successful See Alsopost_payment
post_payment_checkfunction post_payment_check ( | $procedure, | | $coverage, | | $check_number, | | $amount, | | $comment | ) |
|
Posts a check payment. This is a wrapper for post_payment. Parameters$procedure | Procedure id number | $coverage | Coverage that check is related to | $check_number | Number appearing on the check | $amount | Numeric amount of the check | $comment | Text comment to be attached to the ledger |
ReturnsBoolean, successful See Alsopost_payment
post_payment_credit_cardfunction post_payment_credit_card ( | $procedure, | | $coverage, | | $cc_number, | | $exp_m, | | $exp_y, | | $amount, | | $comment | ) |
|
Posts a credit card payment. This is a wrapper for post_payment. Parameters$procedure | Procedure id number | $coverage | Coverage that check is related to | $cc_number | Credit card number | $exp_m | Month expiration | $exp_y | Year expiration | $amount | Numeric amount of the check | $comment | Text comment to be attached to the ledger |
ReturnsBoolean, successful See Alsopost_payment
post_writeofffunction post_writeoff ( | $procedure, | | | | $comment | = | '' , | | $category | = | WRITEOFF | ) |
|
Post a write-off of a particular type to the system for the specified procedure. Parameters$procedure | Procedure id key | $comment | (optional) Text comment for the record. Defaults to a null string. | $category | (optional) Category of writeoff. Defaults to WRITEOFF. Possible values are: |
ReturnsBoolean, if successful
unpostablefunction unpostable ( | $amount, | | $comment | ) |
|
Adds an “unpostable” sum to the global claim log. Currently updates the “global” event log (where procedure = 0). Parameters$amount | Unpostable amount | $comment | Text comment (with check number, etc) |
ReturnsBoolean, successful
writeoff_arrayfunction writeoff_array ( | $a | ) |
|
Write off an array of items ParametersReturnsBoolean, successful
_procedure_to_patientfunction _procedure_to_patient ( | $procedure | ) |
|
Look up a patient by a procedure id ParametersReturnsPatient id
_query_to_result_arrayfunction _query_to_result_array ( | $query, | | | | $sequential | = | false | ) |
|
Internal helper function to convert SQL queries into arrays of associative arrays. Parameters$query | SQL query text | $sequential | (optional) Number sequentially instead of indexing by identifier. Defaults to false. |
ReturnsArray of associative arrays.
|