Repository navigation
[docs] Files for 3.1 - #126
Draft
rithviknishad wants to merge 11 commits into
Draft
rithviknishad wants to merge 11 commits into
rithviknishad wants to merge 11 commits into
Conversation
Rewrite the Files concept and File Upload reference against care ddfd840 and care_fe 5e02f9a, update five flows, and add Find a file, Take a photo and upload it, and Record audio and upload it. Each flow has a narrated, subtitled video and step screenshots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- File storage for a stack without Docker: MinIO, bucket settings, and an end-to-end upload check before recording. - Keep load_fixtures output, which prints the fixture password, out of session files. - Give every cast patient two tags before recording patient pages; the 3.1 header wraps the name otherwise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying coredocs with
|
| Latest commit: |
c8f415b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a360cc39.coredocs.pages.dev |
| Branch Preview URL: | https://claude-files-module-3-1-upda.coredocs.pages.dev |
The facility role pickers never offer a role named Admin. Care defines two roles with that name; the role sync looks roles up by name, so the database keeps one Admin role, for role organizations (care sync_permissions_roles.py:37-45, roles/role.py:57-67,81-93), and the facility screens list roles with context FACILITY (care_fe RoleSelect.tsx:140, LinkFacilityUserSheet.tsx:207, LinkUserToDepartmentSheet.tsx:131; care security/api/viewsets/roles.py:10-15). The referral rows keep the Admin, Manager and Member roles of a role organization, which care security/permissions/referral.py gives Can Read Referrals and Can Update Referrals, and drop only the bare facility Admin. The concept and the reference now say why Admin is left out. Every other role in the lists matches care security/permissions/patient.py, encounter.py, diagnostic_report.py, service_request.py and referral.py. Pinned care ddfd840, care_fe 5e02f9a. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The concept implied that consent files can be renamed or archived while their encounter is open. The consent details page gives each file only View and Download (care_fe pages/Encounters/ConsentDetail.tsx:197-235); it never calls the file manager's rename or archive, and the Files tab lists only patient and encounter files (components/Files/FilesTab.tsx:23). The backend does allow both, with the encounter's write rule (care emr/api/viewsets/file_upload.py:69-75,127-131; security/authorization/ file_upload.py:37-48). The concept now says only the API can. Pinned care ddfd840, care_fe 5e02f9a. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The concept said Can Update Referrals lets you upload, rename and archive the files of a referral. Referral files show only in the referral's Shared records, where each file has View and a menu with Remove, which takes the file off the referral and keeps the file (care_fe components/Referral/ ReferralSharedRecords.tsx:159-243,416-420; en.json referral_remove_record_description). The rename and archive screens are used only for patient, encounter and diagnostic report files. The backend allows both with can_write_referral, so only the API can. Uploads go through Upload file with the referral file type (ReferralUploadDialog.tsx: 75). Pinned care ddfd840, care_fe 5e02f9a. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Can Write Service Request on Facility row said the permission lets you upload, rename and archive the files of a service request. No screen does: care_fe uses the service_request file type only in the referral record picker (ReferralResourcePicker.tsx:146,325), and no useFileUpload call or file list is mounted for service requests. Only an API call can. Pinned care ddfd840, care_fe 5e02f9a. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each narrated video now plays from the Open Healthcare Network YouTube channel (playlist "Care 3.1 documentation"), with its subtitles on YouTube. The .mp4, .vtt and poster files are removed from this branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ect step 4 The old screenshots of the camera showed Chromium's built-in fake camera (a green test pattern), and the photo was named "Wound photo". The new ones show a camera filming an invented referral letter for Maya Raman, named "Referral letter", recorded as Dr. Meera Iyer on the local 3.1 stack. Step 4 said that Care starts with the back camera. That holds on a small screen only. On a screen at least 1024 px wide, Care starts with the camera last used in this browser, or the first camera in the list (CameraCaptureDialog.tsx: lastUsedCameraDeviceIdAtom, atomWithStorage). The narrated video is re-recorded too; its new YouTube id replaces KvifzjsJ2rA in a following commit, once it is uploaded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The camera view is a photo, which compresses badly as a PNG: 4.7 MB each. Saved at 1440 by 900 with a 256-colour palette they are 0.7 MB, in line with the other images on the site. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new video (bJENiiVSLbQ) shows a camera filming an invented referral letter, the Select Camera menu for step 4, and a voice line for every step. It replaces KvifzjsJ2rA, which showed Chromium's green fake camera. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Updates the Files documentation for Care 3.1 to match the 3.1 code, and adds three flows.
concepts/clinical/files.mdx(Files): rewritten. Files can belong to patients, encounters, consents, diagnostic reports, service requests and referrals; the Files tab lists only patient and encounter files (questionnaire file answers are encounter files); upload, rename and archive (no delete, no unarchive); accepted types; a code-traced Permissions section; the Reports sub-tab is linked to the report-template pages.references/platform/file-upload.mdx(File Upload): adds thereferralfile type, an endpoint table, an authorization matrix per file type (including the closed-encounter rule), signed URLs, settings and defaults, the cleanup of incomplete uploads; fixesget_extension().flows/clinical/files/, in this sidebar order:static/media/clinical/files/: one narrated, subtitled video per flow and screenshots of its steps, with the relevant control outlined.The old flow pages had several statements the 3.1 code contradicts. The main ones:
Only 3.1: the 3.0 pages are left as they are.
What it was verified against
care@ddfd840dbe314b4e53d2a719d2138324d970634b(develop, 2026-11-23)care_fe@5e02f9aa4f690e08375da310511e14606985f788(develop, 2026-11-26)Every statement rests on a recorded fact: a cited line of the pinned code with its quote machine-checked (537 code facts), a runtime result, or a product decision. Two fresh-context reviewers checked each sentence against its fact (concept and flows; reference separately).
Runtime: a disposable local stack built from exactly those commits (new empty database plus Care's fixtures, MinIO for file storage, invented names: City General Hospital, Dr. Lakshmi Menon, patients Ravi Kumar and Thomas Varghese). All eight flows were recorded as a Doctor with a role in the encounter's department, never as a superuser; every API call in the recordings returned 2xx. Runtime checks changed three pages:
.rtfand.aviuploads are refused, because the browser reports a type Care does not allow.Deliberate differences from the house style
## Permissions. The concept template has no such section, but the concept skill asks for it and the Patient concept has one.concepts/clinical/filesandreferences/platform/file-upload), as before; moving either would change a published URL.enandml.Left out
Product findings (recorded, not filed)
The product team asked for these to be reported here only.
Certain
care_fe: the Files upload picker offers.tiff, but the backend refuses it.care_fe: audio recordings are named.mp3and sent asaudio/mpeg, but contain WebM or MP4 audio. In the Play Audio dialog they open at their end, and play only on the second press.care_fe:.oggfiles show as Video.care: refused uploads, renames and archives all say "Cannot View File".care(patient access, not Files):Patient.rebuild_organization_cacheadds the PatientOrganization link-row id instead of its organization id (care/emr/models/patient.py:89-96).care_fe: on the Files list, pressing → opens a preview when none is open.Likely, or needs intent
.rtfand.avifail in Chromium on macOS because of their browser MIME types..docxand.pptxare not accepted anywhere.FILE_UPLOAD_KEY,FILE_UPLOAD_SECRETandFILE_UPLOAD_REGIONsettings are never read.What the skill learned
Moved to the consolidated Ezhuthachan skill update, #141. This PR no longer changes
.claude/skills/.🤖 Generated with Claude Code