Automated Migration Testing (HAPI-FHIR) V7_4_0 (#6170)

* Automated Migration Testing (HAPI-FHIR) - updated test migration scripts for 7_4_0

* Automated Migration Testing (HAPI-FHIR) - updated test migration scripts for 7_2_0
This commit is contained in:
volodymyr-korzh 2024-07-31 16:44:27 -06:00 committed by GitHub
parent c2d4a2a2e6
commit d32433e68b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 588 additions and 15 deletions

View File

@ -108,10 +108,15 @@ public class HapiEmbeddedDatabasesExtension implements AfterAllCallback {
try {
myDatabaseInitializerHelper.insertPersistenceTestData(getEmbeddedDatabase(theDriverType), theVersionEnum);
} catch (Exception theE) {
ourLog.info(
"Could not insert persistence test data most likely because we don't have any for version {} and driver {}",
theVersionEnum,
theDriverType);
if (theE.getMessage().contains("Error loading file: migration/releases/")) {
ourLog.info(
"Could not insert persistence test data most likely because we don't have any for version {} and driver {}",
theVersionEnum,
theDriverType);
} else {
// throw sql execution Exceptions
throw theE;
}
}
}

View File

@ -1 +1,91 @@
INSERT INTO TRM_CONCEPT_MAP_GRP_ELM_TGT (PID, TARGET_CODE, CONCEPT_MAP_URL, TARGET_DISPLAY, TARGET_EQUIVALENCE, SYSTEM_URL, SYSTEM_VERSION, VALUESET_URL, CONCEPT_MAP_GRP_ELM_PID) VALUES (61, NULL, NULL, 'PYRIDOXINE', 'UNMATCHED', NULL, NULL, NULL, 60);
INSERT INTO TRM_CONCEPT (
PID,
CODEVAL,
CODESYSTEM_PID,
DISPLAY,
INDEX_STATUS,
PARENT_PIDS,
PARENT_PIDS_VC,
CODE_SEQUENCE,
CONCEPT_UPDATED
) VALUES (
1,
'LA4393-0',
54,
'CR_1430_Reason no radiation',
1,
'1415721',
'1415721',
3,
'2024-05-01 17:02:39.139'
);
INSERT INTO TRM_VALUESET_CONCEPT (
PID,
CODEVAL,
DISPLAY,
INDEX_STATUS,
VALUESET_ORDER,
SOURCE_DIRECT_PARENT_PIDS,
SOURCE_DIRECT_PARENT_PIDS_VC,
SOURCE_PID,
SYSTEM_URL,
SYSTEM_VER,
VALUESET_PID
) VALUES (
1,
'LA4382-3',
'CR_1550_Radiation treatment location',
1,
2,
'1415722',
'1415722',
1,
'HTTP://LOINC.ORG',
'V2.67',
59
);
INSERT INTO TRM_CONCEPT_PROPERTY (
PID,
PROP_CODESYSTEM,
PROP_DISPLAY,
PROP_KEY,
PROP_TYPE,
PROP_VAL,
PROP_VAL_BIN,
PROP_VAL_LOB,
CS_VER_PID,
CONCEPT_PID
) VALUES (
154,
'http://loinc.org',
'code-A',
'CODING',
1,
'LP98185-9',
'\x48656c6c6f20776f726c6421',
83006307,
54,
1
);
INSERT INTO HFJ_BINARY_STORAGE_BLOB (
BLOB_ID,
BLOB_DATA,
CONTENT_TYPE,
BLOB_HASH,
PUBLISHED_DATE,
RESOURCE_ID,
BLOB_SIZE,
STORAGE_CONTENT_BIN
) VALUES (
'1',
72995,
'TEXT',
'dc7197cfab936698bef7818975c185a9b88b71a0a0a2493deea487706ddf20cb',
'2024-06-15 09:58:42.92',
'1678',
16,
'\x48656c6c6f20776f726c6421'
);

View File

@ -1 +1,91 @@
INSERT INTO TRM_CONCEPT_MAP_GRP_ELM_TGT (PID, TARGET_CODE, CONCEPT_MAP_URL, TARGET_DISPLAY, TARGET_EQUIVALENCE, SYSTEM_URL, SYSTEM_VERSION, VALUESET_URL, CONCEPT_MAP_GRP_ELM_PID) VALUES (61, NULL, NULL, 'PYRIDOXINE', 'UNMATCHED', NULL, NULL, NULL, 60);
INSERT INTO TRM_CONCEPT (
PID,
CODEVAL,
CODESYSTEM_PID,
DISPLAY,
INDEX_STATUS,
PARENT_PIDS,
PARENT_PIDS_VC,
CODE_SEQUENCE,
CONCEPT_UPDATED
) VALUES (
1,
'LA4393-0',
54,
'CR_1430_Reason no radiation',
1,
'1415721',
'1415721',
3,
'2024-05-01 17:02:39.139'
);
INSERT INTO TRM_VALUESET_CONCEPT (
PID,
CODEVAL,
DISPLAY,
INDEX_STATUS,
VALUESET_ORDER,
SOURCE_DIRECT_PARENT_PIDS,
SOURCE_DIRECT_PARENT_PIDS_VC,
SOURCE_PID,
SYSTEM_URL,
SYSTEM_VER,
VALUESET_PID
) VALUES (
1,
'LA4382-3',
'CR_1550_Radiation treatment location',
1,
2,
'1415722',
'1415722',
1,
'HTTP://LOINC.ORG',
'V2.67',
59
);
INSERT INTO TRM_CONCEPT_PROPERTY (
PID,
PROP_CODESYSTEM,
PROP_DISPLAY,
PROP_KEY,
PROP_TYPE,
PROP_VAL,
PROP_VAL_BIN,
PROP_VAL_LOB,
CS_VER_PID,
CONCEPT_PID
) VALUES (
154,
'http://loinc.org',
'code-A',
'CODING',
1,
'LP98185-9',
8479927,
83006307,
54,
1
);
INSERT INTO HFJ_BINARY_STORAGE_BLOB (
BLOB_ID,
BLOB_DATA,
CONTENT_TYPE,
BLOB_HASH,
PUBLISHED_DATE,
RESOURCE_ID,
BLOB_SIZE,
STORAGE_CONTENT_BIN
) VALUES (
'1',
72995,
'TEXT',
'dc7197cfab936698bef7818975c185a9b88b71a0a0a2493deea487706ddf20cb',
'2024-06-15 09:58:42.92',
'1678',
16,
7368816
);

View File

@ -1 +1,91 @@
INSERT INTO TRM_CONCEPT_MAP_GRP_ELM_TGT (PID, TARGET_CODE, CONCEPT_MAP_URL, TARGET_DISPLAY, TARGET_EQUIVALENCE, SYSTEM_URL, SYSTEM_VERSION, VALUESET_URL, CONCEPT_MAP_GRP_ELM_PID) VALUES (61, NULL, NULL, 'PYRIDOXINE', 'UNMATCHED', NULL, NULL, NULL, 60);
INSERT INTO TRM_CONCEPT (
PID,
CODEVAL,
CODESYSTEM_PID,
DISPLAY,
INDEX_STATUS,
PARENT_PIDS,
PARENT_PIDS_VC,
CODE_SEQUENCE,
CONCEPT_UPDATED
) VALUES (
1,
'LA4393-0',
54,
'CR_1430_Reason no radiation',
1,
'1415721',
'1415721',
3,
SYSDATE
);
INSERT INTO TRM_VALUESET_CONCEPT (
PID,
CODEVAL,
DISPLAY,
INDEX_STATUS,
VALUESET_ORDER,
SOURCE_DIRECT_PARENT_PIDS,
SOURCE_DIRECT_PARENT_PIDS_VC,
SOURCE_PID,
SYSTEM_URL,
SYSTEM_VER,
VALUESET_PID
) VALUES (
1,
'LA4382-3',
'CR_1550_Radiation treatment location',
1,
2,
'1415722',
'1415722',
1,
'HTTP://LOINC.ORG',
'V2.67',
59
);
INSERT INTO TRM_CONCEPT_PROPERTY (
PID,
PROP_CODESYSTEM,
PROP_DISPLAY,
PROP_KEY,
PROP_TYPE,
PROP_VAL,
PROP_VAL_BIN,
PROP_VAL_LOB,
CS_VER_PID,
CONCEPT_PID
) VALUES (
154,
'http://loinc.org',
'code-A',
'CODING',
1,
'LP98185-9',
HEXTORAW('453d7a34'),
HEXTORAW('8B9D5255'),
54,
1
);
INSERT INTO HFJ_BINARY_STORAGE_BLOB (
BLOB_ID,
BLOB_DATA,
CONTENT_TYPE,
BLOB_HASH,
PUBLISHED_DATE,
RESOURCE_ID,
BLOB_SIZE,
STORAGE_CONTENT_BIN
) VALUES (
'1',
HEXTORAW('28721FB0'),
'TEXT',
'dc7197cfab936698bef7818975c185a9b88b71a0a0a2493deea487706ddf20cb',
SYSDATE,
'1678',
16,
HEXTORAW('1B25E293')
);

View File

@ -1,5 +1,91 @@
INSERT INTO TRM_CONCEPT_MAP_GRP_ELM_TGT (PID, TARGET_CODE, CONCEPT_MAP_URL, TARGET_DISPLAY, TARGET_EQUIVALENCE, SYSTEM_URL, SYSTEM_VERSION, VALUESET_URL, CONCEPT_MAP_GRP_ELM_PID) VALUES (61, NULL, NULL, 'PYRIDOXINE', 'UNMATCHED', NULL, NULL, NULL, 60);
INSERT INTO HFJ_BINARY_STORAGE (CONTENT_ID, RESOURCE_ID, CONTENT_TYPE, STORAGE_CONTENT_BIN, PUBLISHED_DATE ) VALUES ('1', '2', 'TEXT', '\x48656c6c6f20776f726c6421', '2023-06-15 09:58:42.92');
INSERT INTO TRM_CONCEPT (PID, CODEVAL, PARENT_PIDS_VC ) VALUES (1, 'aCode', '1 2 3 4');
INSERT INTO TRM_CONCEPT_PROPERTY (PID, PROP_KEY, PROP_VAL_BIN, PROP_TYPE) VALUES (1, 'key', '\x48656c6c6f20776f726c6421', 1);
INSERT INTO TRM_VALUESET_CONCEPT (PID, VALUESET_PID, VALUESET_ORDER, SOURCE_DIRECT_PARENT_PIDS_VC, SYSTEM_URL, CODEVAL) VALUES (1, 59, 1, '1 2 3 4 5 6', 'http://systemUlr', 'codeVal');
INSERT INTO TRM_CONCEPT (
PID,
CODEVAL,
CODESYSTEM_PID,
DISPLAY,
INDEX_STATUS,
PARENT_PIDS,
PARENT_PIDS_VC,
CODE_SEQUENCE,
CONCEPT_UPDATED
) VALUES (
1,
'LA4393-0',
54,
'CR_1430_Reason no radiation',
1,
'1415721',
'1415721',
3,
'2024-05-01 17:02:39.139'
);
INSERT INTO TRM_VALUESET_CONCEPT (
PID,
CODEVAL,
DISPLAY,
INDEX_STATUS,
VALUESET_ORDER,
SOURCE_DIRECT_PARENT_PIDS,
SOURCE_DIRECT_PARENT_PIDS_VC,
SOURCE_PID,
SYSTEM_URL,
SYSTEM_VER,
VALUESET_PID
) VALUES (
1,
'LA4382-3',
'CR_1550_Radiation treatment location',
1,
2,
'1415722',
'1415722',
1,
'HTTP://LOINC.ORG',
'V2.67',
59
);
INSERT INTO TRM_CONCEPT_PROPERTY (
PID,
PROP_CODESYSTEM,
PROP_DISPLAY,
PROP_KEY,
PROP_TYPE,
PROP_VAL,
PROP_VAL_BIN,
PROP_VAL_LOB,
CS_VER_PID,
CONCEPT_PID
) VALUES (
154,
'http://loinc.org',
'code-A',
'CODING',
1,
'LP98185-9',
'\x48656c6c6f20776f726c6421',
83006307,
54,
1
);
INSERT INTO HFJ_BINARY_STORAGE_BLOB (
BLOB_ID,
BLOB_DATA,
CONTENT_TYPE,
BLOB_HASH,
PUBLISHED_DATE,
RESOURCE_ID,
BLOB_SIZE,
STORAGE_CONTENT_BIN
) VALUES (
'1',
72995,
'TEXT',
'dc7197cfab936698bef7818975c185a9b88b71a0a0a2493deea487706ddf20cb',
'2024-06-15 09:58:42.92',
'1678',
16,
'\x48656c6c6f20776f726c6421'
);

View File

@ -0,0 +1,53 @@
INSERT INTO HFJ_RES_SEARCH_URL (
PARTITION_DATE,
PARTITION_ID,
RES_SEARCH_URL,
CREATED_TIME,
RES_ID
) VALUES (
'2024-04-05',
1,
'https://example.com',
'2024-06-29 10:14:39.69',
1906
);
INSERT INTO HFJ_IDX_CMP_STRING_UNIQ (
PID,
PARTITION_DATE,
PARTITION_ID,
HASH_COMPLETE,
HASH_COMPLETE_2,
IDX_STRING,
RES_ID
) VALUES (
2,
'2024-04-05',
1,
-8173309116900170400,
-7180360017667394276,
'Patient?birthdate=2024-07-24&family=FAM',
1906
);
INSERT INTO TRM_CONCEPT_DESIG (
PID,
LANG,
USE_CODE,
USE_DISPLAY,
USE_SYSTEM,
VAL,
VAL_VC,
CS_VER_PID,
CONCEPT_PID
) VALUES (
106,
'NL',
'900000000000013009',
'SYNONYM',
'HTTP://SNOMED.INFO/SCT',
'SYSTOLISCHE BLOEDDRUK - EXPIRATIE',
'SYSTOLISCHE BLOEDDRUK - EXPIRATIE',
54,
150
);

View File

@ -0,0 +1,53 @@
INSERT INTO HFJ_RES_SEARCH_URL (
PARTITION_DATE,
PARTITION_ID,
RES_SEARCH_URL,
CREATED_TIME,
RES_ID
) VALUES (
'2024-04-05',
1,
'https://example.com',
'2024-06-29 10:14:39.69',
1906
);
INSERT INTO HFJ_IDX_CMP_STRING_UNIQ (
PID,
PARTITION_DATE,
PARTITION_ID,
HASH_COMPLETE,
HASH_COMPLETE_2,
IDX_STRING,
RES_ID
) VALUES (
2,
'2024-04-05',
1,
-8173309116900170400,
-7180360017667394276,
'Patient?birthdate=2024-07-24&family=FAM',
1906
);
INSERT INTO TRM_CONCEPT_DESIG (
PID,
LANG,
USE_CODE,
USE_DISPLAY,
USE_SYSTEM,
VAL,
VAL_VC,
CS_VER_PID,
CONCEPT_PID
) VALUES (
106,
'NL',
'900000000000013009',
'SYNONYM',
'HTTP://SNOMED.INFO/SCT',
'SYSTOLISCHE BLOEDDRUK - EXPIRATIE',
'SYSTOLISCHE BLOEDDRUK - EXPIRATIE',
54,
150
);

View File

@ -0,0 +1,53 @@
INSERT INTO HFJ_RES_SEARCH_URL (
PARTITION_DATE,
PARTITION_ID,
RES_SEARCH_URL,
CREATED_TIME,
RES_ID
) VALUES (
SYSDATE,
1,
'https://example.com',
SYSDATE,
1906
);
INSERT INTO HFJ_IDX_CMP_STRING_UNIQ (
PID,
PARTITION_DATE,
PARTITION_ID,
HASH_COMPLETE,
HASH_COMPLETE_2,
IDX_STRING,
RES_ID
) VALUES (
2,
SYSDATE,
1,
-8173309116900170400,
-7180360017667394276,
'Patient?birthdate=2024-07-24&family=FAM',
1906
);
INSERT INTO TRM_CONCEPT_DESIG (
PID,
LANG,
USE_CODE,
USE_DISPLAY,
USE_SYSTEM,
VAL,
VAL_VC,
CS_VER_PID,
CONCEPT_PID
) VALUES (
106,
'NL',
'900000000000013009',
'SYNONYM',
'HTTP://SNOMED.INFO/SCT',
'SYSTOLISCHE BLOEDDRUK - EXPIRATIE',
'SYSTOLISCHE BLOEDDRUK - EXPIRATIE',
54,
150
);

View File

@ -0,0 +1,53 @@
INSERT INTO HFJ_RES_SEARCH_URL (
PARTITION_DATE,
PARTITION_ID,
RES_SEARCH_URL,
CREATED_TIME,
RES_ID
) VALUES (
'2024-04-05',
1,
'https://example.com',
'2024-06-29 10:14:39.69',
1906
);
INSERT INTO HFJ_IDX_CMP_STRING_UNIQ (
PID,
PARTITION_DATE,
PARTITION_ID,
HASH_COMPLETE,
HASH_COMPLETE_2,
IDX_STRING,
RES_ID
) VALUES (
2,
'2024-04-05',
1,
-8173309116900170400,
-7180360017667394276,
'Patient?birthdate=2024-07-24&family=FAM',
1906
);
INSERT INTO TRM_CONCEPT_DESIG (
PID,
LANG,
USE_CODE,
USE_DISPLAY,
USE_SYSTEM,
VAL,
VAL_VC,
CS_VER_PID,
CONCEPT_PID
) VALUES (
106,
'NL',
'900000000000013009',
'SYNONYM',
'HTTP://SNOMED.INFO/SCT',
'SYSTOLISCHE BLOEDDRUK - EXPIRATIE',
'SYSTOLISCHE BLOEDDRUK - EXPIRATIE',
54,
150
);

View File

@ -171,7 +171,7 @@ public class HapiSchemaMigrationTest {
final Object allCountValue = allCount.get(0).values().iterator().next();
if (allCountValue instanceof Number allCountNumber) {
assertThat(allCountNumber.intValue()).isEqualTo(1);
assertThat(allCountNumber.intValue()).isEqualTo(2);
}
try (final Connection connection = theDatabase.getDataSource().getConnection()) {
@ -230,7 +230,7 @@ public class HapiSchemaMigrationTest {
final Object queryResultValueVal = queryResultValuesVal.iterator().next();
assertThat(queryResultValueVal).isInstanceOf(Number.class);
if (queryResultValueVal instanceof Number queryResultNumber) {
assertThat(queryResultNumber.intValue()).isEqualTo(1);
assertThat(queryResultNumber.intValue()).isEqualTo(2);
}
assertThat(nullValVcCount).hasSize(1);
@ -244,7 +244,7 @@ public class HapiSchemaMigrationTest {
final Object allCountValue = allCount.get(0).values().iterator().next();
if (allCountValue instanceof Number allCountNumber) {
assertThat(allCountNumber.intValue()).isEqualTo(1);
assertThat(allCountNumber.intValue()).isEqualTo(2);
}
try (final Connection connection = theDatabase.getDataSource().getConnection()) {