Skip to content

feat: add edit and delete for manual source resources#632

Open
clintmoyer wants to merge 8 commits intofastenhealth:mainfrom
clintmoyer:feat/edit-delete-records
Open

feat: add edit and delete for manual source resources#632
clintmoyer wants to merge 8 commits intofastenhealth:mainfrom
clintmoyer:feat/edit-delete-records

Conversation

@clintmoyer
Copy link

Purpose

Allow users to edit and delete FHIR resources directly from the resource detail page for manually-created records.

Tickets

Summary of Changes

  • Add DELETE and PUT endpoints for per-resource edit/delete, restricted to manual/fasten sources
  • Add delete button with confirmation modal on the resource detail page
  • Add edit modal with type-specific form fields for 7 FHIR resource types
  • Add backward-compatible PATCH and DELETE-by-type endpoints for the medical record wizard
  • Add backend and frontend unit tests

Screenshots / Recordings

demo.mp4

add DeleteResourceBySourceId and UpdateResourceBySourceId to the
database layer, restricted to manual/fasten platform sources.
add DELETE and PUT handlers at /resource/fhir/:sourceId/:resourceId
with appropriate error mapping (404 not found, 403 non-manual source).
regenerate mock database.
add deleteResourceBySourceId and updateResourceBySourceId methods to
the API service. show a delete button with confirmation modal on the
resource detail page when viewing resources from manual/fasten sources.
on success, display a toast and redirect to the source explore page.
add handler tests for DeleteResourceFhir and UpdateResourceFhir
covering happy path, not-found, and invalid resource ID cases.
add database tests for DeleteResourceBySourceId and
UpdateResourceBySourceId covering happy path, non-manual source
rejection, and resource-not-found cases.
add standalone ResourceEditComponent modal supporting Condition,
Observation, MedicationRequest, Encounter, AllergyIntolerance,
Procedure, and Immunization resource types. each type renders
appropriate form controls for status, dates, values, and notes.
show an edit button alongside the delete button for supported resource
types on manual/fasten sources. clicking opens the ResourceEditComponent
modal, and on save refreshes the display model without a page reload.
add unit tests for ResourceEditComponent covering form building,
date helpers, value type detection, merge logic, and submit behavior
for all seven supported resource types. add tests for the detail
page's isEditableResourceType and editResource modal integration.
add UpdateResourceFhirByType (PATCH) and DeleteResourceFhirByType
handlers to preserve backward compatibility with the medical record
wizard and practitioner pages after rebasing onto main. use a separate
/resource/fhir-by-type/ route for type-based deletes to avoid
conflicting with the source-based DELETE route.
run gofmt on Go source files and prettier on TypeScript, HTML,
and SCSS files to enforce consistent code style.
@CLAassistant
Copy link

CLAassistant commented Feb 14, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edit and delete individual medical records

2 participants