Generate ID from name for eForms #39

Open
opened 2024-10-04 07:44:29 +00:00 by linus · 1 comment
Owner

if org_id == form.find(".//cac:ContractingParty/cac:Party/cac:PartyIdentification/cbc:ID", namespaces).text:
name = org.find("./efac:Company/cac:PartyName/cbc:Name", namespaces).text
identifier = ocds.Identifier(
scheme="National-ID",
id=str(org.find("./efac:Company/cac:PartyLegalEntity/cbc:CompanyID", namespaces).text) if org.find("./efac:Company/cac:PartyLegalEntity/cbc:CompanyID", namespaces) is not None else str(""),

https://git.fsfe.org/TEDective/etl/src/commit/0f8fb40017324818cd6ef88b667d4e807d6dcc6f/tedective_etl/ted_to_ocds/transform.py#L496-L500
Author
Owner

supplier = ocds.Organization(
id = str(uuid.uuid4()),
roles={"supplier"}
)
supplier.name = name
supplier.identifier = identifier
supplier.address = address
supplier.contactPoint = contactPoint
supplier.details = details

https://git.fsfe.org/TEDective/etl/src/commit/0f8fb40017324818cd6ef88b667d4e807d6dcc6f/tedective_etl/ted_to_ocds/transform.py#L527-L535
Sign in to join this conversation.