Skip to content
Partner Developer Portal

FAQ & Troubleshooting

1. What is a Backfill?

Occasionally, large-scale processing activities may require data to be regenerated or re-ingested. These activities are referred to as backfills and may temporarily affect data processing schedules or result in larger-than-normal volumes of changes being visible within iPCV datasets.

1. How do I know how many query seconds our query costs and how much time it took for the data to be transferred?

The cost of a query can only be known for sure after executing it. Query seconds and data transfer time are the same from a billing point of view. To measure the impact of a query in your quota, measure the time it takes for your query to execute end to end.

2. How do I know how much of my quota have I used?

Please contact your account manager.

1. What exactly is an transform_datetime?

The timestamp indicating when the record was last processed and updated in the data model. This field is crucial for understanding the current state of the data. It uses the timestamp(6) with time zone data type; for example: 2023-05-12 14:30:15.000000 UTC.

It is not the timestamp when the underlying clinical or administrative change occurred, nor necessarily the time when the source record was created.

2. What is the difference between transform_datetime, _execution_date, load_datetime and _ingest_time?

transform_datetime is the timestamp indicating when the record was last processed and updated in the data model.

_execution_date is a varchar representation of transform_datetime in the yyyyMMddHHmmss format. It is retained for backward compatibility with iPCV v1.

load_datetime and _ingest_time both indicate when the data was ingested or loaded into the datalake. They represent the same point in time in different formats: load_datetime is a timestamp, while _ingest_time is a string in yyyyMMddHHmmss format. _ingest_time is added only for the backward compatibility with iPCV v1.

Use transform_datetime to identify a processing run, and use load_datetime when you need the time at which the data was ingested or loaded into the datalake.

3. Which time zone is used in the date-like columns?

UTC

1. How to track the same patient across multiple practices?

The closest that EMIS Web has to track a person moving across multiple practices is the person_guid on the Patient table. This is an internally generated identifier for an individual, rather than an individual’s registration. This will always be present even if an NHS Number isn’t, or is in the wrong format.

Always remember that EMIS Web suffers from record duplication. There can be patients with multiple registrations at the same practice, with the same person_guid but different patient_id and emis_no values. In many of these cases, the NHS Number will also be the same.

Unfortunately, there is also a process where the same patient can have different person_guid value, and the chain can be broken if a user performs a merge operation in EMIS Web – this operation discards one of the merged records.

2. What is a patient’s scope?

This is a concept related to the DSA of the user querying the data. A patient scope is whether the patient can be seen by the user of the DSA. We say that a patient “enters” the scope if it wasn’t visible before and it is now. We say that a patient “leaves” or “falls out of” the scope if the patient was visible but it is not anymore.

Take for example a DSA that disallows patients who had opted out via NDOP. Given an NDOP Patient A and a non-NDOP Patient B, the user of this DSA will only be allowed to see patient B. A primary care user (whose DSA allows NDOP) will be able to see both patients A and B.

3. What codes are used when a patient has opted in/out?

This is detailed here.

4. What date is used when determining patient opt out status?

effective_datetime is used where available. This helps preserve the correct order when a patient record is transferred to another practice, because the effective date remains unchanged even if other dates are re-entered.

If the source does not populate effective_datetime, availability_datetime and observation_id are used to determine the sequence of events.

5. What happens if a patient has non-corresponding opt out and opt in codes?

Each opt-out code has a corresponding opt-in code. If both opt-in and opt-out codes are present, the effective datetime of the opt-out code must be later than that of the opt-in code for the patient to be considered opted out.

If the effective datetimes of the opt-in and opt-out codes are the same, or if an effective datetime is unavailable, availability_datetime and observation_id are used to prioritise the opt-out code.

A patient with no recorded opt-out code is considered opted in.

6. How do I know if a patient’s scope has changed?

If a patient opts out of data sharing their data will no longer be visible but this will not trigger a deletion event in the patient delta tables as the record has not been deleted. It will act as a silent deletion. The converse is true if a patient opts in, their data will start to be visible without an addition event.

7. I think the organisation table contains many duplicate rows. Is this expected? Will the live data be the same? How do we identify the primary key / unique row identifier within each iPCV view?

Each row represents one organisation within an EMIS Web instance. The organisation column identifies the source EMIS Web instance, while organisation_id is unique only within that instance. Use organisation_id with organisation, or use organisation_uuid, to identify a row.

If you’d like to get the organisation_guid of the owning organisation, the below query will do it

SELECT
organisation_guid,
organisation_uuid
FROM
hive.explorer_ipcv_vanilla.organisation_v2
WHERE
organisation = CONCAT('CDB-', CAST(cdb AS VARCHAR));

8. Variable string columns generally don’t have a set maximum length. What’s the maximum string length we can expect to encounter?

Our version of the data lake doesn’t require maximum varchar values, which is handy with some columns where text with an unknown length is being added. For example, there are fields that contain full XML documents. For most fields, the length will be quite stable, it is best to decide this empirically by getting the max length of each field, and to add a margin on top. For very long fields you may need to truncate or preprocess the data.

1. Why is there an update event but none of the rows have changed?

Some flavours of iPCV present restricted views, where not all columns are shown. It is possible that an update has happened in one of the columns that are hidden in the specific flavours, thus there will be a false update event presented in the deltas.

2. Are tables partitioned?

Yes, by organisation.

3. How much history of deltas is kept?

Refer this page Understanding Deltas for details.

1. Are tables partitioned?

Yes, by organisation.

1. Why do date precision fields in iPCV v2 show YMDT? Is this a bug?

This is intentional, not a bug. In iPCV v2, dates are captured as datetimes, including when no time was supplied. Because midnight can be either a valid time or an indication that no time was supplied, the precision cannot be reliably inferred for each value. The precision therefore reflects how the column is captured.

2. Why do SNOMED CT description IDs differ between iPCV v1 and v2?

iPCV v2 uses official SNOMED CT mappings in the Codeable Concept model instead of the legacy mappings used in v1. This change replaces variation_codesnomed with variation_snomedinteropoutgoing. The description IDs in v2 should align with the UK SNOMED CT Browser. See Improved SNOMED CT mapping approach for details.

3. Why do execution dates differ between iPCV v1 and v2 for the same records?

iPCV v1 and v2 are processed at different times, so their execution dates (or transform_datetime values) are not expected to match, even for the same records. Use these timestamps within their respective version to identify updates and process new data; do not compare them across versions. See Data Freshness & Availability and Understanding Deltas for more information.

1. What happens with NDOP when people deregister from a practice? Does it still get updated? Or will they opt out because of the 12-day rule?

When a patient deregisters, in theory, the patient record should stay as it was at the time of deregistration as they will no longer be classed as a fully registered patient. This would mean that they would automatically opt out after 12 days. However, the record could still be updated if the practice chooses to do so, though it is very unlikely.

2. If a patient moves practices, and opt out in their new practice, does this record also matches to their previous practice?

When moving practices, patients get deregistered from their previous practice. If the practice chooses not to continue updating their record, NDOP status may be different between the two (most likely opted out at the new practice, while opted in at the previous one).

1. What is trino?

Trino is an open source query engine behind explorer. Click here to learn more.

2. If we use a Linked Server with SQL Server, do we still need to write Trino SQL?

Yes, regardless of how you query explorer, queries will always reach our Trino cluster, thus the queries need to be in a format understood by the cluster. This is standard ANSI SQL, so migrating from other SQL flavours should be straightforward. Click here to learn more.

1. What is a user schema?

Users of explorer will notice that they are not allowed to create, update or delete data in the schemas that they have access to. The exception to this rule is a user schema, which is a place for people to bring their own data into the platform.

2. Can I bring my data to EXA and do analytics on the platform?

Absolutely! You can write data to your personal user schema and join it as appropriate to the data that your DSA allows you to see. An administrator will need to give you a user schema so please raise it with your account manager.

See the sections below for the corresponding FAQs

Section titled “See the sections below for the corresponding FAQs”

If you encounter unexpected results when querying iPCVs, check here for common issues, causes and solutions:

Error/Issue Cause Solution
Missing data for some dates Each table is processed independently. If one table fails or is delayed, the others are not affected. Wait for the next scheduled run, or check the data_freshness table for the latest successful execution.
Records may appear updated when they are not In some restricted flavours, some columns are hidden. This can make records look like they have changed. If you have access to Vanilla flavour, use it to get the complete dataset, or validate your query against the full schema.
Duplicates in the Organisation table The same organisation can appear in more than one EMIS Web instance, and organisation_id is only unique within an instance. Use organisation_id with organisation, or use organisation_uuid, to identify a row.
Timezone issues All date-like columns are stored in UTC. Convert to your local timezone as needed.
String columns with no maximum length Some fields, such as XML, can be very long. Review your data to identify the typical maximum string length and truncate if necessary.