-
Notifications
You must be signed in to change notification settings - Fork 21
Adding New Datasets
Some items on this list may not be needed if the infrastructure already exists, as in the case of patient data datasets, however all should be checked.
- Add the new API models
- Create
src/models/{yourApiModel}.ts
, or updatesrc/models/patientDataResponse.ts
if this is an extension to the patient data datasets
- Create
- Add the service (unless this is an extension to the patient data datasets)
- Create
src/services/rest{Dataset}Service.ts
- Update
src/services/interfaces.ts
to include an interface for the service - Update
src/ioc/identifer.ts
to include a new service identifier - Update
src/ioc/initialization.ts
to initialise the service
- Create
- Add new type values in
src/constants
- Update
entryTypes.ts
to include a newEntryType
and populate the details inentryTypeMap
- Update
commentEntryType.ts
to include a newCommentEntryType
if comments are available for this entry type - Update
dataSource.ts
to include a newDataSource
- Update
errorType.ts
to include a newErrorSourceType
- Update
- Create a new Pinia store in
src/stores
- Create a subclass of
TimelineEntry
insrc/models
- Create a timeline component in
src/components/private/timeline/entry
- Register the component in
src/plugins/components.ts
- Register the component in
- Update
TimelineComponent
insrc/components/private/timeline
to retrieve data - Update
FilterComponent
insrc/components/private/timeline
to return the record count ingetFilterCount
function - Add the
EntryType
to theLandingView.vue
component if required
Inside src/services
, extend interfaces.ts
with the new API details, whether that's a new interface or additional endpoints on an existing interface. Add or update the rest{feature}Service.ts
file required for this new dataset. Any supporting models should be under the models
folder.
Remember to check if the feature is enabled through the featuretoggleconfig.json
retrieved with the configuration endpoint call on startup.
Add a Pinia store definition to src/stores
. Follow the last implementation for the latest standards in implementing and managing the management of loading flags.
The entryType.ts
and its accompanying details map will expose data to the many recurring components/features within the application. This includes the quick links and the landing page sections. The details here include the description, which is used on the landing page and the quick link text. An important aspect here is to add the name of the upcoming timeline entry component for the component
property. This is used to tell Vue what component should be rendered for a particular timeline entry.
If the dataset allows for notes, then commentEntryTypes.ts
needs to be extended to include the new code that will be used to store the comment with the correct relationship in the database, this value can be found within the database's CommentEntryTypeCode
table. This should have already been added with the back-end work related to this dataset.
dataSource.ts
should be correctly extended with the datasource value used by the admin/API to block access to the data. Forgetting this will cause needless API calls that return empty responses. After creating the new DataSource
entry, src/utility/dataSourceUtil.ts
should be updated to check if the dataset is blocked before issuing API calls.
Dataset data must be transformed from the API data models to a model that inherits from the TimelineEntry class. This class includes the function used to perform text filtering on the timeline.
Thus, taking the API data model that was added under the models
folder, one creates a dataset-specific {dataset}TimelineEntry
class within models/timeline
. This class will house the constructor which sets the EntryType
for the entry instance and will also become the wrapping class to abstract the underlying data from the API model.
This new {dataset}TimelineEntry
class will be responsible for exposing the underlying data to the upcoming timeline entry component.
This component renders the data associated with a single record and is the crux of this endeavour to display and allow users to interact with the returned data.
Each component's particular needs are dictated by user story requirements. As a guide for the latest coding standards, follow the implementation of the most recently added dataset.
You will need to register the name of this new timeline entry component in /src/plugins/components.ts
, matching the component
value in entryTypeMap
for the dataset. Otherwise, the component will not be rendered.
TimelineComponent
is the hub for all the datasets and handles retrieval and filtering entries before they are displayed to the user. You will need extend the fetchDataset
method with a new case. TimelineComponent
is also responsible for determining if data is still being retrieved and the conditions under datasetIsLoading
should be extended for this purpose.
In theory, on a basic dataset extension, this should be all the changes necessary to get the data to the timeline.
The landing view is often used to tell users what we offer, so adding the EntryType
to the collection for datasets or services will cause all required data to be displayed (with the help of the details stored in the entryTypeMap
).
-
Developer Standard and Processes
-
Workstation Setup
-
IDE Configuration
-
Application Config
-
RedHat SSO Authorization Server
-
Known Issues