Replace hand-edited JSON with a setup wizard

Melissa had to author entity.json by hand and know FTPS from SFTP to do
it - which is what broke the last two CAMBS runs. setup-entity.bat now
asks the questions and writes the file:

- protocol is a numbered menu, stored as an explicit "protocol" key that
  wins over the sftp:// host prefix and the older tls flag
- pasted schemes and paths are stripped off the host before saving
- it creates the practice folders, then logs in and checks every
  practice's remote folder exists, so a wrong path or protocol surfaces
  in seconds instead of in the next morning's run

Also drops insurance_file_type from the required path: with no setting
the engine sends every file in the date folder minus Windows clutter, so
"No .pdf files" can't happen on a folder full of TIFs. Connection
failures now print what to change rather than just WinSCP's wording.
This commit is contained in:
2026-08-26 20:03:00 -05:00
parent c5af810806
commit 0b6f8cb16d
6 changed files with 890 additions and 224 deletions
+5 -4
View File
@@ -1,11 +1,11 @@
{
"_note": "You do not have to write this by hand - double-click setup-entity.bat and it asks you the questions instead. The 'ftps' section is the daily date-folder upload (over whatever protocol says, SFTP included); the 'sftp' section is the patient files.",
"workflow": "insurance+patient",
"insurance_file_type": "pdf",
"ftps": {
"host": "ftp.example.com",
"port": 21,
"tls": true,
"protocol": "ftps",
"port": null,
"username": "shared-username",
"password": "shared-password",
"tiff_path": "/{practice}/Insurance",
@@ -14,7 +14,8 @@
"sftp": {
"host": "sftp.example.com",
"port": 22,
"protocol": "sftp",
"port": null,
"username": "shared-username",
"password": "shared-password",
"patient_path": "/{practice}/Patient"