Public Access
Auto-add missing entity.json keys as null; null now means ignore, not error
On each run the engine compares entity.json against the full set of known keys, adds any that are absent with a null value, and writes the file back - so nobody has to hand-type key names (the typo class of config error goes away). A null/blank value now means "this entity doesn't use this": files that would need it are ignored with a yellow notice and left in place, instead of counting as failures. Insurance-unconfigured no longer skips the patient step for that practice (was continue, now else-branch).
This commit is contained in:
@@ -129,11 +129,13 @@ leave its login and every other path alone.
|
||||
folder name — so one `entity.json` can serve every practice as long as they
|
||||
all follow the same folder-naming pattern on the server.
|
||||
|
||||
**Every "Yes" field must be present in `entity.json`** unless *every single
|
||||
practice* under the entity supplies it in its own `practice.json`. If a
|
||||
required field is missing or blank, the run stops that practice with a
|
||||
`CONFIG ERROR` message naming exactly which fields it couldn't find — nothing
|
||||
uploads and nothing archives for that practice until it's fixed.
|
||||
**Missing keys fix themselves:** on every run, the tool checks `entity.json`
|
||||
for any keys it knows about that aren't in the file, adds them with a value
|
||||
of `null`, and saves the file — so you never have to type key names by hand.
|
||||
A `null` value means **"we don't use this — ignore it"**: any files that
|
||||
would need that setting are left in place untouched (with a yellow notice in
|
||||
the output), not treated as failures. To turn a feature on, just open
|
||||
`entity.json` and replace the `null` with a real value in quotes.
|
||||
|
||||
**Editing JSON — the rules that bite:**
|
||||
- Key names must match **exactly** (all lowercase, underscores): `host`, not
|
||||
@@ -207,16 +209,17 @@ those are entity-wide only.
|
||||
- **Files failed to upload** — they stay in the date folder. Fix the issue and run again.
|
||||
- **A date folder is still there after running** — one or more files failed. Check the output window.
|
||||
- **WinSCP error on startup** — run `setup.bat` again to re-download WinSCP.
|
||||
- **`CONFIG ERROR: entity.json is missing or has blank: ...`** — the fields it
|
||||
lists couldn't be found in that entity's `entity.json` (or the practice's
|
||||
`practice.json`). Open the file and check those exact key names against the
|
||||
example above — a typo in the key name counts as missing.
|
||||
- **`... upload not configured (ftps.xyz is null/blank) - N file(s) ignored`** —
|
||||
there are files to send, but the listed settings are still `null` (or blank)
|
||||
in that entity's `entity.json`. If those files *should* upload, open
|
||||
`entity.json` and fill in real values for the listed keys. If that upload
|
||||
type genuinely doesn't apply to this entity, the message is normal and the
|
||||
files just stay where they are.
|
||||
- **`Added missing key(s) to entity.json ...`** — informational, not an error.
|
||||
The tool added keys that were absent (as `null`) so they're ready to fill in.
|
||||
- **`No .pdf files in <date>\` but the folder isn't empty** — the files in the
|
||||
date folder are probably TIFs. Add `"insurance_file_type": "tif",` at the top
|
||||
date folder are probably TIFs. Set `"insurance_file_type": "tif",` at the top
|
||||
level of that entity's `entity.json` (right under `workflow`).
|
||||
- **Every field shows missing at once** — the section name itself is probably
|
||||
wrong (must be exactly `ftps` / `sftp`), or the file's structure got damaged
|
||||
while editing. Compare the overall shape against `Entities\EXAMPLE\entity.json`.
|
||||
- **The startup banner shows the wrong file type** — the banner line
|
||||
(`Entity: ... | File type: .pdf | ...`) shows what was actually read from
|
||||
`entity.json`, so it's the quickest way to confirm your edit took effect.
|
||||
|
||||
Reference in New Issue
Block a user