bluehalo / node-fhir-server-core

An Open Source secure REST implementation for the HL7 FHIR Specification. For API documentation, please see https://github.com/Asymmetrik/node-fhir-server-core/wiki.
https://asymmetrik.com/healthcare
MIT License
388 stars 120 forks source link

Patient is an invalid profile configuration #348

Open legacyunlimited opened 9 months ago

legacyunlimited commented 9 months ago

I am using Asymmetrik's FHIR server core in conjunction with Firebase Cloud Functions to manage patient data and healthcare functionality in my application. I'm currently facing an issue while running the command "firebase emulators:start." Specifically, I'm encountering the following error: "Error: Patient is an invalid profile configuration."

I've taken some initial steps to address this issue, primarily focusing on resolving a mismatch between the resource type name "Patient" (uppercase "P") in my FHIR server configuration and the resource type name "patient" (lowercase "p") in my code.

Additionally, I've ensured that the "patient.metadata.js" file correctly exports a "profiles" object containing a "patient" object. You can access my GitHub repository for your review at the following link: https://github.com/legacyunlimited/medical-clinic-referral/tree/patient_config_error

Full error log: [debug] [2023-09-19T14:02:02.811Z] Got response code 400; body Failed to generate manifest from function source: Error: Patient is an invalid profile configuration, please see the wiki for instructions on how to enable a profile in your server, https://github.com/Asymmetrik/node-fhir-server-core/wiki/Profile

[error] ⬢ functions: Failed to load function definition from source: FirebaseError: Functions codebase could not be analyzed successfully. It may have a syntax or runtime error {"metadata":{"emulator":{"name":"functions"},"message":"Failed to load function definition from source: FirebaseError: Functions codebase could not be analyzed successfully. It may have a syntax or runtime error"}}

Please advise on a solution. Thanks in advance.

legacyunlimited commented 9 months ago

commenting out the code I had in patient.metadata.js and the reference to it in index.js fixed the issue but I am unsure why it did.