How sg-victorchai/gep-poc works
Project type and purpose
• This is primarily a React‑based Single Page Application (SPA) that demonstrates HL7 FHIR resource browsing, searching, and CRUD workflows—all scaffolded and enhanced by GitHub Copilot prompts.
• There is no custom backend code in this repo; instead it calls out to an external FHIR server (Synapxe Innovation Sandbox) as its data source.
• The .copilot folder holds developer‑time prompt definitions used to generate UI code based on FHIR StructureDefinition, SearchParameter, and OperationDefinition resources.
File structure
• Top‑level folders:
– .copilot : Markdown prompts used during development to drive codegen
– fhirprofile : FHIR StructureDefinition JSON files (metadata that the UI loads to auto‑generate forms and tables)
– fhirweb-spa : full React/Vite SPA codebase
• Inside fhirweb-spa:
– src/components : shared UI components (Header, Footer, badges, etc.)
– src/pages : page components mapping to routes (Home, PatientSearch, ObservationPage, CRUD pages, etc.)
– src/services/fhir/client.ts : HTTP client for FHIR API calls
– src/store : Redux Toolkit setup and slices (authSlice, uiSlice)
– src/styles & Tailwind config: CSS setup
– Build & config files: Vite, TSConfig, PostCSS, Vitest
• Deployment contexts: .env.development / .env.example define the external FHIR server URL and API key.
README for additional insights
• The README details a four‑part journey that illustrates how the UI is programmatically generated from FHIR metadata via Copilot
• It clarifies that the runtime system is an SPA calling an external FHIR API, not a monolithic full‑stack with its own backend server
• It confirms reliance on standard FHIR resources—Patient, Observation, CarePlan, MedicationRequest—and custom extensions via StructureDefinition JSON