This is the Final Project for bit502.
It will deal with creating databases, implementing APIs, calling APIs, creating API proxies, creating and installing Windows Services, and standing up MVC websites with and without the Arch MVC template.
It will focus around entering claims into ACME Inc's Claim System from Waystar, decisioning those claims, and then getting the status of those claims.
** SEE LINKS FOR INDIVIDUAL STORIES! **
- Notes:
- You should use Unity for Dependency Injection whenever possible.
- Helpful Hints:
- While we want to use Unity for Dependency Injection, you don't need to worry about using it for your Unit Test projects (for the testing of your API Proxies).
- When using Unity, you may have some classes, such as
BusinessLogic
classes, that you're changing often as you expand your app. Rather than have to redo the Interface every few minutes, I recommend just doing aWhateverBL whateverBL = new WhateverBL();
until you are done with your changes, THEN come back and change any calls to the Business Logic methods to get it from theUnityBootstrapper
. Otherwise you'll be constantly updating the Interface for your Business Logic (every time you add a new method, etc.)
- Create a new "Acme Claims Database".
- Within the database, create a table for "Claim Criteria". It will have the following columns:
- Id
- Claim Amount
- Claim Network Status (In / Out of Network)
- Preferred Provider (true / false)
- Pre-Approval Obtained (true / false)
- Within the database, create a table for "Provider Status". It will have the following columns:
- Id
- Provider Code
- Provider Name
- In-Network (true / false)
- Preferred Provider (true / false)
- Seed the Provider Status table as follows:
- 1, ANT, Anthem, true, true
- 2, HUM, Humana, true, false
- 3, UHC, United Healthcare, false, false
- 4, AC1, ACA Insurance 1, true, false
- Within the database, create table for "Claims". It will have the following columns:
- Id (Claim ID)
- Patient Name
- Provider Code
- Claim Amount
- Pre-Approval Obtained (true / false)
- Claim Status (int - will get values from ClaimStatusDecode so we have proper normalization)
- Within the database, create a table for "ClaimStatusDecode". This will hold the values for ClaimStatus. It will have the following columns:
- Id
- ClaimStatus
- Seed the ClaimStatusDecode with the following values:
- 1, pending
- 2, approved
- 3, denied
- Create an MVC website where managers at Acme Insurance will enter the criteria used to approve or deny a claim.
- This site should NOT use the Waystar template, as it's not a Waystar site.
- It should have a "New / Edit" view and a "Read Only" view of the data.
- It should allow viewing / editing the following criteria:
- Claim Amount (This is the amount the claim must be less than to be approved)
- Claim Network Status (In / Out of Network)
- Preferred Provider (true / false)
- Pre-Approval Obtained (true / false)
- It should save the data to a database (Acme Claims Database - Claim Criteria Table).
- You can enter MUTLIPLE criteria - each will be a row in the Claim Criteria Table.
- Example: You could enter:
- 100.00, In Network, False, False
- 500.00, In Network, True, False
- 300.00, Out of Network, True, True
- The claim will be approved by the Decider Service if the Claim meets any of the entered criteria (that's another part of the assignment).
Create an API that can be called to send a claim into Acme Insurance.
Required fields in the Request are:
- Patient Name
- Provider
- Claim Amount
- Pre-Approval Obtained (true / false)
It will write the claim to a database (Acme Claims Database - Claims Table).
It will return the Claim ID.
Set up the API in IIS.
Create an API Proxy and Nuget package in your Local Nuget.
You should set up Unit Tests for your API Proxy.
HINT / IMPORTANT NOTE: We are trying to use Unity to do Dependency Injection. In doing that, we are supposed to work through the Interfaces. HOWEVER, your front-end API request that takes in your Model CANNOT reference the Interface - it won't work. Instead, just reference the model itself. In other words, use THIS:
public int Post(ClaimModel claimModel)…NOT this:
public int Post(IClaimModel claimModel)
- Create an MVC website where managers at Acme Insurance will enter the criteria used to approve or deny a claim.
- This site should NOT use the Waystar template, as it's not a Waystar site.
- It should have a "New / Edit" view and a "Read Only" view of the data.
- It should allow viewing / editing the following criteria:
- Claim Amount (This is the amount the claim must be less than to be approved)
- Claim Network Status (In / Out of Network)
- Preferred Provider (true / false)
- Pre-Approval Obtained (true / false)
- It should save the data to a database (Acme Claims Database - Claim Criteria Table).
- You can enter MUTLIPLE criteria - each will be a row in the Claim Criteria Table.
- Example: You could enter:
- 100.00, In Network, False, False
- 500.00, In Network, True, False
- 300.00, Out of Network, True, True
- The claim will be approved by the Decider Service if the Claim meets any of the entered criteria (that's another part of the assignment).
- Create an API that can be called to check the status of an existing claim.
- It should accept a Claim ID, read the database (Acme Claims Database
- Claims table), and return the Claim Status.
- Set up the API in IIS.
- Create an API Proxy and Nuget package in your Local Nuget.
- You should set up Unit Tests for your API Proxy.
- HINT: You may choose to combine this with the API for Part 3 (US #212033) to just have one API that does everything that's needed.
workspace {
!identifiers hierarchical
model {
properties {
"structurizr.groupSeparator" "/"
}
group "AcmeInsurance" {
AcmeInsurance_Claims = softwareSystem "AcmeInsurance.Claims" {
Database = container "Database" {
description "Stores claims and claim criteria"
technology "SQL Server Database"
group "AcmeInsurance.Claims.Database.Tables" {
Provider = component "Provider" {
description "Id, Code, Name, IsInNetwork, IsPreferred"
technology "Table"
}
ClaimStatus = component "ClaimStatus" {
description "Id, Value"
technology "Table"
}
Claim = component "Claim" {
description "Id, PatientName, ProviderId, Amount, HasPreApproval, ClaimStatusId"
technology "Table"
-> ClaimStatus "ClaimStatusId = Id"
-> Provider "ProviderId = Id"
}
Criteria = component "Criteria" {
description "Id, DenialMinimumAmount, RequiresProviderIsInNetwork, RequiresProviderIsPreferred, RequiresClaimHasPreApproval"
technology "Table"
}
}
StoredProcedures = component "Stored Procedures" {
description "Provides access to the Claims database"
technology "Stored Procedures"
-> Claim "Manages claim data in"
-> Criteria "Manages criteria data in"
}
}
Data = container "Data" {
description "Provides access to the Claims Database"
technology ".NET Class Library"
group "AcmeInsurance.Claims.Data.DataAccess" {
Dal = component "Dal" {
description "Manages access to the Claims database"
technology "class"
-> Database "Accesses"
-> Database.StoredProcedures "Calls"
}
}
Dtos = component "Dtos" {
description "Represent data from the Claims database"
technology "classes"
}
ClaimRepository = component "ClaimRepository" {
description "Manages claims"
technology "class"
-> Dal "Accesses the database using"
-> Database "Manages claims data in"
-> Database.StoredProcedures "Manages claim data using"
-> Dtos "Returns"
}
CriteriaRepository = component "CriteriaRepository" {
description "Manages criteria"
technology "class"
-> Dal "Accesses the database using"
-> Database "Manages criteria data in"
-> Database.StoredProcedures "Manages criteria data using"
-> Dtos "Returns"
}
}
Models = container "Models" {
description "Provides models for criteria"
technology ".NET Class Library"
ClaimModel = component "ClaimModel" {
description "Represents a claim"
technology "class"
}
CriteriaModel = component "CriteriaModel" {
description "Represents criteria"
technology "class"
}
}
Business = container "Business" {
description "Provides business logic for claims"
technology ".NET Class Library"
ClaimBl = component "ClaimBl" {
description "Manages claims"
technology "class"
-> Data "Accesses claims data using"
-> Data.ClaimRepository "Accesses claims data using"
-> Data.Dtos "Converts to/from"
-> Models.ClaimModel "Converts to/from and returns"
}
CriteriaBl = component "CriteriaBl" {
description "Manages criteria"
technology "class"
-> Data "Accesses criteria data using"
-> Data.CriteriaRepository "Accesses criteria data using"
-> Data.Dtos "Converts to/from"
-> Models.CriteriaModel "Converts to/from and returns"
}
}
group "AcmeInsurance.Claims.CriteriaManager.Web" {
Web_CriteriaManager = container "Web.CriteriaManager" {
description "Allows Managers to enter criteria used to approve or deny a claim"
technology "ASP.NET MVC"
ViewModels = component "ViewModels" {
description "Used to pass criteria data between the views and controllers"
technology "classes"
}
Views = component "Views" {
description "Allows criteria to be viewed and edited"
technology "Razor"
-> ViewModels "Displays data from and stores data in"
}
group "AcmeInsurance.Claims.Web.CriteriaManager.Controllers" {
CriteriaController = component "CriteriaController" {
description "Manages criteria"
technology "Controller class"
-> Business.CriteriaBl "Manages criteria using"
-> Models.CriteriaModel "Converts ViewModels from/to"
-> ViewModels "Converts Models from/to"
-> Views "Displays criteria and allows criteria to be entered using"
}
}
}
}
group "AcmeInsurance.Claims.WebServices" {
WebServices_Api = container "WebServices.Api" {
description "Enter new claims and check the status of existing claims"
technology "ASP.NET Web API"
group "AcmeInsurance.Claims.WebServices.Controllers" {
ClaimsController = component "ClaimsController" {
description "Manages claims"
technology "ApiController class"
-> Business.ClaimBl "Manages claims using"
-> Models.ClaimModel "De/serializes JSON from/to"
}
}
}
WebServices_Proxy = container "WebServices.Proxy" {
description "Enter new claims and check the status of existing claims"
technology ".NET Class Library/NuGet Package"
ClaimProxy = component "ClaimProxy" {
description "Manages claims"
technology "class"
-> WebServices_Api.ClaimsController "Calls" "JSON/HTTPS"
-> Models.ClaimModel "De/serializes JSON from/to and returns"
}
}
WebServices_Proxy_Tests = container "WebServices.Proxy.Tests" {
description "Tests the ClaimProxy"
technology "MSTest Unit Test Project"
ClaimProxyTests = component "ClaimProxyTests" {
description "Tests the ClaimProxy"
technology "class"
-> WebServices_Proxy.ClaimProxy "Tests"
-> Models.ClaimModel "Uses"
}
}
}
group "AcmeInsurance.Claims.Services" {
Services_DeciderService = container "Services.DeciderService" {
description "Decides whether to approve or deny a claim"
technology "Windows Service"
Service = component "Service" {
description "Decides whether to approve or deny a claim"
technology "class"
-> Business "Manages claim status using"
-> Business.ClaimBl "Manages claim status using"
-> Business.CriteriaBl "Lists criteria using"
-> Models "Uses"
-> Models.ClaimModel "Uses"
-> Models.CriteriaModel "Uses"
}
}
}
}
Manager = person "Acme Insurance Manager" {
description "Manages criteria used to approve or deny a claim"
-> AcmeInsurance_Claims.Web_CriteriaManager.Views "Manages criteria using" "HTTPS"
}
}
}
views {
container AcmeInsurance_Claims {
properties {
"structurizr.softwareSystemBoundaries" "true"
"structurizr.enterpriseBoundary" "true"
}
include element.parent==AcmeInsurance_Claims.Services_DeciderService
include element.parent==AcmeInsurance_Claims.WebServices_Proxy_Tests
include element.parent==AcmeInsurance_Claims.WebServices_Proxy
include element.parent==AcmeInsurance_Claims.WebServices_Api
include element.parent==AcmeInsurance_Claims.Web_CriteriaManager
include element.parent==AcmeInsurance_Claims.Business
include element.parent==AcmeInsurance_Claims.Models
include element.parent==AcmeInsurance_Claims.Data
include element.parent==AcmeInsurance_Claims.Database
include element.parent==AcmeInsurance_Claims
include element.type==person
include element.type==softwareSystem
include element.type==container
include element.type==component
}
}
}