Skip to content

Commit

Permalink
📝 docs: Extend the documentation of some models in FhirMappingResult …
Browse files Browse the repository at this point in the history
…class
  • Loading branch information
Dogukan Cavdaroglu authored and sinaci committed Oct 22, 2024
1 parent 7391640 commit c6f8deb
Showing 1 changed file with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,21 @@ trait BaseFhirMappingResult {
val timestamp: Timestamp

/**
* If there is a problem in the process, the JSON serialization of the source data
* A JSON serialization of the source data. The main data source is represented with the "mainSource" key,
* while other data sources are serialized using their respective source aliases as keys.
*
* Example structure:
* {
* "mainSource": {
* ... // Serialized data from the main source
* },
* "encounters": {
* ... // Data from encounters source
* },
* "observations": {
* ... // Data from observations source
* }
* }
*/
val source: String

Expand All @@ -49,6 +63,13 @@ trait BaseFhirMappingResult {
/**
* Case class representing the result of a FHIR mapping process, extending the base mapping result.
* This model is designed to store the outcome of the mapping, including the generated FHIR resource.
*
* Each instance of `FhirMappingResult` corresponds to a single FHIR resource, regardless
* of how many FHIR resources are created from each input row.
*
* If the mapping is 1-to-many, multiple instances of `FhirMappingResult` will be created from a single source row,
* each holding one of the generated FHIR resources.
*
* It includes the common fields from [[BaseFhirMappingResult]], along with specific information about
* the FHIR resource type and the serialized output of the mapped resource.
*
Expand Down Expand Up @@ -111,9 +132,9 @@ case class FhirMappingResult(
}

/**
* Stores the results of mapping i.e. generated FHIR resources for a source input.
* It groups the mapped FHIR resources generated from the input data, allowing for easy access to
* the output for a specific input row.
* Represents the result of the mapping process for a single source row, storing the generated FHIR resources.
* Each source row corresponds to one instance of `FhirMappingResultsForInput`. If the mapping process is
* 1-to-many, the `mappedFhirResources` field contains all the FHIR resources created from the single source row.
*
* In addition to the common fields from [[BaseFhirMappingResult]], it includes a collection of mapped
* FHIR resources, which represent the outcome of the mapping process for each input source.
Expand Down

0 comments on commit c6f8deb

Please sign in to comment.