# Project plan — theshoulderpractice (The Shoulder Practice, SHOU-1)

Evidence date: 2026-10-01.

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

Inspected revision: `master` at `b805d89` (2025-06-20, "bitbucket-pipelines.yml edited online with Bitbucket"). The scan-host path named in the onboarding task (`~/projects/sonar_scan/repos/theshoulderpractice`) was not present on this machine. Evidence comes from a read-only clone of `origin/master`.

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

## Product

**The Shoulder Practice** is a clinical and practice-administration web application built on the Evolution Software **Palette / Unified Framework**. The installation code used in configuration, SQL, and conditional logic is **SHOU-1**.

Provenance: **Implemented**. `core_custom/SHOU-1/Web.config` sets the mail subject to `The Shoulder Practice SHOU-1 DEV - {content}` and one `website` value to `The Shoulder Practice SHOU-1 DEV`. A 2020 data script updates claim rows that stored `christelle@theshoulderpractice.co.za`. Clinical code refers to shoulder arthroscopy images, rotator-cuff and glenohumeral surfaces, and a setup code of `SHOU-1`.

No README, product brief, or project plan exists in the repository. The purpose above is recovered from the site, the medical module, and the SHOU-1 SQL scripts.

The same tree also contains the generic framework used for other customer codes (SQL folders such as `CAPI-1`, `CHUU-1`, `GLOB` references in code, `STUD-1`). Those are framework leftovers in this checkout. They are not evidence that this repository currently operates those other products.

## Branch reality

`origin/HEAD` is `master`. Last commit `b805d89` by Jaco Brits, 2025-06-20. History has 12 commits, from `e541ef9` (2024-01-10, Dewald Stander, "Initial commit") through that tip.

Authors: Dewald Stander (5), Jaco Brits (7).

Only branch: `master`. No other remote branches. No release tags.

Product commits stop at `07b9ef0` (2024-01-24, "removed test code that lead to division by zero"). The seven commits on 2025-06-20 only add or edit `bitbucket-pipelines.yml` and `sonar-project.properties`.

`52fa73f` (2024-01-15, "exclusion of pages") renamed a large set of generated clinical surface controls under `core_custom/SHOU-1/controls/surface/` to `*.ascx.exclude`, so ASP.NET will not compile them. A custom Surgical Notes control remains under `controls/surface_custom/`.

The task-creation scan listed both `bitbucket-pipelines.yml` and `bitbucket-pipeline.yml`. Only `bitbucket-pipelines.yml` is in `master`. Provenance of the singular filename: **Unknown** — it may have been an untracked file on the scan host.

## Objectives (inferred from the application, not from a written plan)

No project plan or requirements document exists in the repository. The following are **Inferred** from the medical module, surface names in code, and SHOU-1 SQL:

- Let practice staff keep a patient profile and related clinical surfaces (examinations, exam notes, surgical notes, follow-up).
- Let a patient identify themselves with a mobile number and date of birth, record subjectives, and open an exam-note item.
- Maintain medical reference data: practices, doctors, schemes, administrators, ICD-10, tariffs, procedures, symptoms, conditions, diagnoses, trauma.
- Submit or check medical-aid membership through MediSwitch (member validation, claim, reversal).
- Book procedures against a place of service and a tariff rate type.
- Run the generic Palette capabilities that ship with the framework: content, users, calendar, tasks, sales documents, SMS credit, campaigns.

## Scope

### In scope of this repository

- ASP.NET Web Forms site `core_custom/SHOU-1` (the SHOU-1 site).
- Class libraries `business` (`framework_business`) and `library` (`framework_library`).
- WCF site `service` (`framework_service.svc`).
- SQL Server Database project `data` (`data.sqlproj`) and versioned scripts, including three SHOU-1 scripts from 2020.
- Desktop `SchedulerTool` (Google Sheets import entry point).
- Console and library tools under `tools/` (constructor, data importer, exporter, scheduler, CAPI custom API, CEP).
- Published snapshots under `publish/SHOU-1` and `publish/service`.
- Zip bundles under `release/1.0.0.1` and `release/1.0.5`.
- Bitbucket Pipeline that runs a SonarQube scan on `master` and on pull requests. It does not deploy.

### Out of scope / not established

- The live SQL Server database. The checked-in connection string points at catalog `Framework_SHOU-1_Dev` on machine `NB-DEWALD`. Whether a production catalog named `Framework_SHOU-1` is still online is **Unknown / Requires Confirmation**.
- The public URL of the practice site. `WebAddy` is `http://localhost:17901`. A commented WCF endpoint names `http://service.paletteone.com/framework_service.svc`.
- MediSwitch, Netgen SMS, Evolution Software SMTP, and Google APIs as operated accounts. This repo only contains client configuration.
- A mobile application. `mobile/mobile.csproj` is a .NET Framework 4.8 class library with no application screens.
- Automated tests. No test project was found.

## System architecture

```text
Browser
  → ASP.NET Web Forms site core_custom/SHOU-1
      (session user, Canvas host, admin pages, medical pages)
  → SQL Server catalog Framework_SHOU-1_Dev (dev string in Web.config)
      tables prefixed pal_
  → WCF framework_service.svc (checked-in client address is localhost:58913)
  → MediSwitch gateway (QA URLs active in Web.config; live URLs commented out)
  → Netgen SMS SOAP (sms.netgen.co.za)
  → SMTP smtp.evolutionsoftware.co.za

SchedulerTool.exe googlesheetimport*
  → Google Sheets API
  → same business library (intended; whether SHOU-1 uses these imports is unknown)

SonarQube
  → Bitbucket Pipeline on master and pull requests only
```

Hosting of the IIS site is **Unknown**. `publish/SHOU-1` is a precompiled Web Forms publish. `release/*/files.zip` and `scripts.zip` are packaged drops. No `appspec.yml`, Dockerfile, or deploy step exists in the pipeline.

## Major components

| Component | Role |
|---|---|
| `core_custom/SHOU-1` | Practice web site. Admin pages, medical reference pages, Canvas host for modules and surfaces. |
| `core`, `core-dev` | Additional copies of the framework web site. `SHOU-1.sln` opens `core` as a website at `http://localhost:45935` and `core-dev` as a second website project. Which copy is deployed is **Unknown**. |
| `business` | Domain objects, enums (`pNums`), data access helpers, MediSwitch and calendar classes. Builds to `components/`. |
| `library` | Shared library used by the site and business layer. Targets .NET Framework 4.7.2. |
| `service` | WCF service. `ProcessInteraction` moves serialised data. `GetVersion` / `SaveVersion` move release files. |
| `data` | SSDT project plus script history. SHOU-1-specific scripts live in `data/Scripts/SHOU-1/`. |
| `controls/surface` | Generic surface form, grid, and view. SHOU-1 branches adjust patient grids, wizard tabs, and billing fields. |
| `controls/surface_custom` | Custom Surgical Notes form, grid, and view. `Canvas.aspx.cs` loads `~/controls/surface_custom/` when a custom control exists. |
| `controls/medical` | Reference-data editors: practices, doctors, schemes, ICD-10, tariffs, procedures, symptoms, conditions, diagnoses, trauma, medical administrators, practice extras. |
| `controls/module` | Pluggable modules: patient sign-in, patient queue, subjectives, procedure booking, MediSwitch MSV, calendar, body map, debtors, sales, tasks. |
| `SchedulerTool` | Hidden WinForms process. Argument `googlesheetimport*` runs Google Sheet imports. |
| `publish`, `release` | Checked-in publish output and versioned zip drops. |

## Milestones visible in the repository

There is no milestone plan. The dates below are evidence of when artefacts were added, not an approved roadmap.

| When | Evidence | What it shows |
|---|---|---|
| 2016–2017 | Comments in `surface_form.ascx.cs` and `SurgicalNotes_form.ascx.cs` (authors CVH, GR) | SHOU-1 clinical rules were written into the framework while it was still evolving. |
| 2020-02-11 to 2020-04-28 | `data/Scripts/SHOU-1/*.sql` | Practice-specific SQL: open-surgery template, referring-doctor number cleanup, place-of-service rate types. |
| 2024-01-10 | `e541ef9` Initial commit | The framework tree, including SHOU-1, enters this Git repository. |
| 2024-01-15 | `52fa73f` exclusion of pages | Generated clinical surface markup is excluded from compilation. |
| 2024-01-24 | `07b9ef0` | Last change to application code found in history. |
| 2025-06-20 | `a12cd73` through `b805d89` | SonarQube pipeline and `sonar-project.properties` only. |

## Dependencies

- .NET Framework 4.8 for `business`, `mobile`, and the SHOU-1 site compilation setting. `library` targets 4.7.2. `httpRuntime` in `Web.config` still says `targetFramework="4.6"`.
- SQL Server, accessed with Integrated Security in the checked-in dev string. Table prefix `pal_`.
- NuGet packages committed under `packages/` (Newtonsoft.Json, NLog, Microsoft.Net.Compilers, Google API client libraries, and others).
- Third-party binaries under `components/`: Telerik.Web.UI, EPPlus, Spire.Pdf, Spire.XLS, AjaxControlToolkit, NReco.VideoConverter, PdfMetamorphosis.
- External services: MediSwitch, Netgen SendEasy SMS, Evolution Software SMTP, optional country web services (disabled by `getCountriesFromWebService` = `0`), Google Sheets.

## Current project status

**Implemented and checked in**, with no commits to application behaviour since January 2024. The pipeline only analyses code. It does not build, test, or deploy.

Whether the practice still runs this build in production, and whether the excluded surface pages were replaced by database-driven generic surfaces, **Requires Confirmation**.

## Known gaps

- No README, test project, or deployment manifest.
- Dev connection string, SMTP credentials, SMS credentials, a vendor sign-in literal, and a Google API JSON file are stored in the repository. Values are not repeated in this document.
- `Web.config` defines the `website` key twice. In .NET configuration the later entry wins, so the effective value is `Evolution Software Framework`, while the subject line still names The Shoulder Practice.
- SQL history includes many other customer codes. Applying that whole history to `Framework_SHOU-1` is not established by the repo.
