# Project plan — lifechoiceMVC_net

Evidence date: 2026-10-10.

Source repository: `git@bitbucket.org:overdrive/lifechoicemvc_net.git`.

Inspected revision: `master` at `69783e2` (2019-12-03 10:13:40 +0200, "Master branch commit", author siliconoverdrive). After fetch, that commit is the only commit in the repository. `HEAD` is `master`.

No `silicon_ark/lifechoiceMVC_net/` directory existed before these files.

This plan describes what the repository contains. It does not decide what the product should become.

## Product

The solution is named **HealthchoiceMVC v2.0**. The web application assembly is `HealthchoiceMVC`, copyright year 2016, version `1.0.0.0`. Public pages, emails, and the layout title use the brand **Healthchoice**. The Bitbucket repository name is `lifechoicemvc_net`. The solution file records an older Team Foundation Server binding at `https://lifechoice.visualstudio.com/defaultcollection`.

**Inferred** from registration screens, menus, and email copy: Healthchoice is a website where a medical practice registers, an administrator activates that practice, and practice staff then invite practitioners and maintain practitioners, patients, and practice administrators.

There is no product statement, README, or requirements document in the source tree. `Project_Readme.html` is the Visual Studio ASP.NET template page ("Your ASP.NET application") and does not describe Healthchoice.

What "Lifechoice" versus "Healthchoice" means as legal or product names is **Unknown / Requires Confirmation**.

## Where the tree was read

| Location | What it is |
|---|---|
| Issue path `~/projects/sonar_scan/repos/lifechoiceMVC_net` | Recorded on OVER-186 at task creation (2026-09-28). That path is not on this machine |
| Fresh clone of `origin/master` | The tree that was read. `HEAD` is `69783e2` |

The task-creation listing included `sonar-project.properties` and `sonarqube_scan.bat`. Those files are not in the git tree at `69783e2`. They were local to the scan host, or they were never committed. **Unknown / Requires Confirmation.**

## Scope in this repository

In scope for this documentation, because the files are in the tree:

- ASP.NET MVC 5 web application `HealthchoiceMVC`.
- SQL Server Database projects `HCDB` and `HCUserDB`, both members of `HealthchoiceMVC v2.0.sln`.
- SQL Server Database project `HCLogDB`, present as a folder and `.sqlproj`, and **not** listed in the solution file.
- NuGet `packages` folder committed with the solution.
- `UpgradeLog.htm`, a Visual Studio report that the SQL and web project types were not installed when the solution was opened. The report says the solution file itself did not need migration.

Out of scope, because they are not in this repository:

- The Azure App Service API at `lcservices20190802115129.azurewebsites.net` that the web app calls for provider disciplines.
- Hosting, IIS, and production connection strings. `Web.Release.config` only removes the `debug` compilation attribute. It does not replace connection strings.
- Any later repository that may have replaced this one after December 2019.

## System shape

```text
Browser
  → HealthchoiceMVC (ASP.NET MVC 5, .NET Framework 4.5, OWIN cookie auth)
       → HCUserDB   ASP.NET Identity users and roles
       → HCDB        domain data (two different shapes; see below)
       → SMTP        smtp.sendgrid.net, from info@healthchoice.co.za
       → HTTPS API   Azure App Service /api/ for discipline lists
```

`HCDB` is described twice, and the two descriptions do not match:

| Source | What it models |
|---|---|
| SSDT project `HCDB` | Provider, practice, unit, patient, diagnosis, medication, authorisation, treatment, process steps, lookups, geography, banks |
| Entity Framework models and migrations under `HealthchoiceMVC` | Practice, person, person contact, practice membership, invites, network affiliation. Automatic migrations are enabled |

The MVC registration and people screens use the Entity Framework model. The SSDT tables for patients, authorisations, and the provider registration wizard are not mapped by `HCDBEntities`. Provenance: **Implemented** in `HCDBEntities.cs` versus `HCDB/dbo/Tables`. Whether both shapes are deployed to the same Azure database `HCDB` is **Unknown / Requires Confirmation**.

## Major components

| Component | Role |
|---|---|
| `HealthchoiceMVC` | Website. Controllers for account, home, people, provider, provider registration, site admin, network affiliations, user type, user role, and the ASP.NET Identity manage screens |
| `HCLocalService` | Reads lookups, user types, roles, networks, and practices from `HCDB`. Calls `HCWebService` for disciplines |
| `HCWebService` | HTTP client for the external API. Discipline methods are live. Geography, bank, diagnosis, ICD, and NAPPI methods are commented out |
| `HCDB` SSDT | Older clinical and provider schema, post-deploy lookup and process data, SQL role `Healthchoice_Website` (role only, no grants in the script) |
| `HCUserDB` SSDT | ASP.NET Identity tables `AspNetUsers`, `AspNetRoles`, `AspNetUserRoles`, `AspNetUserClaims`, `AspNetUserLogins` |
| `HCLogDB` SSDT | Enterprise Library `Log` / `Category` tables and ELMAH procedures. Not referenced by the web `.csproj` that was read |

## Milestones visible in the tree

These are dates found in files, not an approved plan.

| When | Evidence |
|---|---|
| 2016 | `AssemblyCopyright` in `HealthchoiceMVC/Properties/AssemblyInfo.cs` |
| 2016-02-19 | Commented LocalDB catalog name `aspnet-HealthchoiceMVC-20160219124408` in `Web.config` |
| 2019-08-22 | Comment in `AccountController.Register`: stop signing the user in; require email confirmation |
| 2019-09-01 to 2019-10-30 | Entity Framework migration timestamps, `201909011949569_20190901` through `201910301437165_20191030c` |
| 2019-12-03 | Sole git commit on `master` |

No milestone document, backlog, or release tag was found. Git history before this import is **Unknown**. The solution still points at Azure DevOps / Visual Studio Team Services (`lifechoice.visualstudio.com`), so earlier history may exist there.

## Implementation plan as found

There is no written implementation plan. The code shows two generations sitting together:

1. A provider-and-patient process model in the SSDT project: registration steps, chronic medicine authorisation, and patient registration (`HCDB/PostDeployScripts/Script.ProcessTypeTableData.sql` and `Script.ProcessStepTableData.sql`).
2. A 2019 practice-and-person website: practice self-registration, email confirmation, admin activation, practitioner invite, and lists for practitioners, patients, and administrators.

The second generation is what the anonymous "Register" link opens (`Account/RegisterPractice`). The first generation's controllers (`Provider`, `ProviderRegistration`) are still in the project. The home page still contains copy about a 48-hour provider contract and fax number for account type 4. Whether that copy is still the intended public message is **Unknown / Requires Confirmation**.

## Known dependencies

| Dependency | Evidence |
|---|---|
| .NET Framework 4.5 | `HealthchoiceMVC.csproj` `TargetFrameworkVersion` |
| Visual Studio 2013 solution format | `HealthchoiceMVC v2.0.sln` |
| ASP.NET MVC 5.2.3, Web API 5.2.7, Razor 3.2.3 | `packages.config` |
| Entity Framework 6.1.3 | `packages.config` |
| ASP.NET Identity 2.2.1 and OWIN 4.0.1 | `packages.config` |
| Bootstrap 3.3.6, jQuery 2.2.1, jQuery UI 1.12.1, jQuery Validation 1.14.0, InputMask 4.0.9, Modernizr 2.8.3 | `packages.config` |
| Newtonsoft.Json 12.0.2 | `packages.config` |
| SendGrid 6.3.4 package; runtime mail uses `System.Net.Mail.SmtpClient` against `smtp.sendgrid.net` | `packages.config`, `IdentityConfig.EmailService`, `Web.config` |
| SQL Server, including Azure SQL host `hcdev1.database.windows.net` | Active connection strings in `Web.config` |
| External API `https://lcservices20190802115129.azurewebsites.net/api/` | `HCWebService.SetServiceParameters` |
| Facebook login | Enabled in `Startup.Auth.cs`. Microsoft, Twitter, and Google blocks are commented out |
| SSDT / SQL Server Data Tools | Required to build `HCDB` and `HCUserDB`. `UpgradeLog.htm` records that the project type was missing on the machine that produced the report |

## Current project status

**Implemented and frozen in git** at 2019-12-03. One commit. No branches other than `master` were observed on the clone. No test project. No CI file. No deployment script. `appSettings` key `EnvironmentSetting` is `TEST`.

`Web.config` is compiled with `debug="true"`. Release transform only strips that attribute.

Credentials for Azure SQL, SendGrid, Facebook, and the external API are stored in source. This document does not repeat those values. They need human review and rotation. See `technical-documentation.md`.

## Human confirmation

- Whether this repository is still the live Healthchoice site, or a 2019 archive.
- Production host, production database, and whether `hcdev1` was only a development server.
- Which schema is authoritative: SSDT `HCDB` or the Entity Framework practice/person model.
- Intended meaning of `ApplicationUser.AccountType` values. Comments in `HomeController`, `AccountController`, and `SiteAdminController` disagree. See `business-rules.md`.
- Whether `HCLogDB` was ever deployed or called.
- Whether the files `sonar-project.properties` and `sonarqube_scan.bat` should be treated as part of the product. They are not in git.
