Documente Academic
Documente Profesional
Documente Cultură
Note: In this document I reference the suggested table CMS_SERVICE_CLAIM_LINK. This would be a new table
created for the claim roll up. I’m also basing some of this on the code in
ServiceDeliverySearchViewModel.GenerateClaimBatchNew(). It appears that code is currently at the heart of how HFM
creates claims.
One thought to make the rollup work is that we store a SQL Query which rolls up multiple service deliveries. For example,
let’s say we need to roll up on Consumer, Care Plan, Diagnosis, HCPCS, Place of Service, and Provider. The following
query would roll up service deliveries:
We would need to somehow provide a list of service deliveries. Perhaps we could add BATCH_UUID to the
CMS_SERVICE _CLAIM _LINK table. When the user clicks Generate Claim Batch the application should create a new
CMS_BATCH record. It should then write the BATCH_UUID, SERVICE_DELIVERY_UUID, and
SERVICE_DELIVERY_DAILY_DETAIL_UUID of all selected services to the CMS_SERVICE_LINK table. Now, lets take
the same query from above and add CMS_SERVICE_CLAIM_LINK:
With this query the roll up is based on the service deliveries selected by the user. I also added Row_Number so that each
rollup has a unique number.
We need to link each roll up pulled by the query above with a service delivery. To do this we need a query that link the
service delivery table with the query above:
The query above would be at the heart of the roll up. This is the query we would use to pull the service deliveries we
need to roll into claims. This query would be saved in the config table. This query links the service delivery records with
the roll up records.
cmsClaim.ProviderUuid = selectedServiceDelivery.ServiceDelivery.ProviderUuid;
cmsClaim.AgencyUuid = selectedServiceDelivery.ServiceDelivery.AgencyUuid;
cmsClaim.AgencyName = selectedServiceDelivery.ServiceDelivery.Agency;
cmsClaim.SiteDescription = selectedServiceDelivery.ServiceDelivery.Site.ToString();
cmsClaim.FundIdentifierCode = selectedServiceDelivery.FundIdentifierUuid.ToString();
cmsClaim.ServiceUuid = selectedServiceDelivery.ServiceUuid;
cmsClaim.SubProviderName = selectedServiceDelivery.SubProvider;
cmsClaim.TotalUnits = selectedServiceDelivery.TotalUnits;
cmsClaim.UnitPrice = selectedServiceDelivery.ServiceDelivery.UnitPrice;
cmsClaim.DiagnosisCode = selectedServiceDelivery.DiagnosisCode;
cmsClaim.ServiceDeliveryUuid = selectedServiceDelivery.ServiceDeliveryUuid
I’ve added fields to the query to account for this code. HFM could take the recordset returned by the query above and
loop through it. Each time the value of Claim_Number changes a new claim record should created. Each service
associated with a given Claim_Number should be updated with the same Claim_UUID in the
CMS_SERVICE_CLAIM_LINK table. For example:
When HFM moves to the second record it should know that a CMS_CLAIM record was already created for
CLAIM_COUNT 1. It should not create a new CMS_CLAIM record. It should also update
CMS_SERVICE_CLAIM_LINK.CLAIM_UUID where SERVICE_DELIVERY_UUID = ‘3129D68A-53E9-4533-AB0C-
D60E621AD06B’
When HFM moves to the third record it will know a new claim has not been created for Claim_Count 2. Here it
will add a new CMS_CLAIM record for Claim_Count 2. It should also update
CMS_SERVICE_CLAIM_LINK.CLAIM_UUID where SERVICE_DELIVERY_UUID = ‘15FA9ABC-E91C-4D65-B5B7-
13A53E15683D’
When HFM moves to the fourth record it should know that a CMS_CLAIM record was already created for
CLAIM_COUNT 2. It should not create a new CMS_CLAIM record. It should also update
CMS_SERVICE_CLAIM_LINK.CLAIM_UUID where SERVICE_DELIVERY_UUID = ‘6A30DE6A-0C86-435C-808C-
51B7EFEBBB82’
Let’s assume the user has requested we roll up at the service level based on service dates. I think we should have a
check box on the config page which determines if we roll up on dates. I can’t think of any other values we could roll up on
at this level.
By time we reach the service level rollup we should have all of our CMS_Claim records created.
Let’s start by getting a list of claim_uuids associated with the current batch:
For each service delivery in the list we will need to keep track of Service_Date, Units, and Unit Price. We will want to roll
up claims when dates are continuous. Notice in the query above if SERVICE_DELIVERY_DAILY_DETAIL.UNITS is null
we are pulling units from SERVICE_DELIVERY.
It should hit the first record and realize that this is first record. It would note that the current detail record is
HFM will check the second record. It should compare the service information of this record to the information in
memory. It will check if the service date of this record is one day later than the record in memory. It is, so the current
service information is
10/27/10-10/28/10, for 5 units (2.50 + 2.50), billed for 105 (52.5 + 52.5)
HFM will check the third record. It should compare the service information of this record to the information in
memory. It will check if the service date of this record is one day later than the record in memory. It is NOT, so the
current service information should be written to the database. Here we would create a new claim detail record. We will
also update CMS_SERVICE_CLAIM_LINK:
HFM will clear the service information in memory and start a new detail record based on the information in the
third record:
HFM will check the fourth record. It should compare the service information of this record to the information in
memory. It will check if the service date of this record is one day later than the record in memory. It is, so the current
service information is
HFM will check the fifth record. It should compare the service information of this record to the information in
memory. It will check if the service date of this record is one day later than the record in memory. It is, so the current
service information is
11/1/10 -11/3/10, for 8.5 units (2 + 4 + 2.5), billed for 178.5 (42 + 84 + 52.5)
This is the final record in the recordset, so we create the final claim detail record. We will also update
CMS_SERVICE_CLAIM_LINK: