GoogleCloudPlatform / healthcare-data-harmonization-dataflow

Apache License 2.0
35 stars 24 forks source link

Invalid textproto format. Was expecting a text serialized Whistle proto #33

Open AmmyRaj opened 3 months ago

AmmyRaj commented 3 months ago

HI Team,

We are getting this issue while converting from HL7 to FHIR. "Invalid textproto format. Was expecting a text serialized Whistle proto". Can some one lease adviced what and how we need to pass mapping config from arguments and any sample example of configuration help.

Dataflow Jobs:2024-07-04_21_51_08-12156493450845152576

AmmyRaj commented 3 months ago

Please can one help.. Below is my main.textproto got from https://github.com/GoogleCloudPlatform/healthcare-data-harmonization/blob/master/wstl1/mapping_configs/hl7v2_fhir_r4/configurations/main.textproto library_config: { user_libraries: { type: MAPPING_LANGUAGE path: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/projector_library/datatypes.wstl" } } user_libraries: { type: MAPPING_LANGUAGE path: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/projector_library/hl7v2_fhir.wstl" } } user_libraries: { type: MAPPING_LANGUAGE path: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/projector_library/id.wstl" } } user_libraries: { type: MAPPING_LANGUAGE path: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/projector_library/messages.wstl" } } user_libraries: { type: MAPPING_LANGUAGE path: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/projector_library/postprocess.wstl" } } user_libraries: { type: MAPPING_LANGUAGE path: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/projector_library/segments.wstl" } } }

harmonization_config: { code_lookup: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/code_harmonization/Address_Use.harmonization.json" } code_lookup: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/code_harmonization/Allergy_Category.harmonization.json" } code_lookup: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/code_harmonization/Allergy_Severity.harmonization.json" } code_lookup: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/code_harmonization/Allergy_Type.harmonization.json" } code_lookup: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/code_harmonization/Encounter_Class.harmonization.json" } code_lookup: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/code_harmonization/Encounter_Status.harmonization.json" } code_lookup: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/code_harmonization/Gender.harmonization.json" } code_lookup: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/code_harmonization/Name_Type.harmonization.json" } code_lookup: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/code_harmonization/Observation_Status.harmonization.json" } code_lookup: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/code_harmonization/Relationship.harmonize.json" } code_lookup: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/code_harmonization/Report_Status.harmonization.json" } }

structure_mapping_config: { mapping_path_config: { mapping_type: MAPPING_LANGUAGE mapping_config_path: { gcs_location: "gs://healthem-427405-df-pipeline/mapping/mapping_configs/hl7v2_fhir_r4/configurations/main.wstl" } } }

nidhi0710 commented 3 months ago

Hi @AmmyRaj,

The current version supports whistle-2, you need to provide the .wstl file directly as the main file. For more details on whistle-2: https://github.com/GoogleCloudPlatform/healthcare-data-harmonization/tree/master?tab=readme-ov-file

AmmyRaj commented 3 months ago

@nidhi0710 Thanks for update. But HL7V2 to FHIR i dont think it was supported in whistle2 as per documents. Can you share sample mapping .wstl file that we can use through whistle2 through dataflow pipeline.

Really your help solve my day.

nidhi0710 commented 3 months ago

Hi @AmmyRaj, Samples for hl7v2-fhir will be uploaded soon in the harmonization repo. In the meantime please follow this guide to write custom hl7v2-fhir mappings.

AmmyRaj commented 3 months ago

@nidhi0710 Thnks a lot but it will take a lot of time to write custom mapping. we thought we can use whistle 1 code in this dataflow pipeline code but it seems it wont be possible.

We can use Azure Fhir convertor for our cases. Please update us once HL7 to Fhir mapping is ready