Fusion¶
Une archive OCDS agrège toutes les instances disponibles pour un processus de passation de marché à un moment donné, et peut inclure :
Une instance compilée qui donne un aperçu de l'état actuel d'un processus de passation de marché, en montrant seulement les valeurs de champs les plus récentes.
Une instance versionnée qui indique tous les états successifs d'un processus de passation de marché, en montrant l'évolution de la valeur de chaque champ dans le temps.
La fusion (merging) est le processus qui combine des instances individuelles en une version compilée ou versionnée, décrite plus en détail ci-dessous :
Une instance compilée est créée en prenant uniquement les valeurs les plus récentes des champs des instances d'un processus de passation de marché donné.
Une instance versionnée est créée en prenant toutes les valeurs des champs des instances d'un processus de passation de marché donné, en copiant les métadonnées de l'instance dont elles sont extraites et en les plaçant dans l'ordre chronologique.
Worked Example
Le service achat d'un acheteur public publie un communiqué annonçant une opportunité de marché au 1er janvier, dans laquelle la valeur totale estimée du marché est de 1 000 USD. Le 31 janvier, cet acheteur publie un communiqué pour corriger les informations, avec une description du marché mieux renseignée. Le 5 février, l’agence publie un nouveau communiqué afin de modifier l'annonce, dans lequel la valeur totale estimée de l’achat est portée à 2 000 USD.
Le service achat décide d'attribuer le marché à deux des soumissionnaires. Le 1er mars, il publie une instance OCDS qui annonce l'attribution à la société A d'un contrat de 750 USD. Le 3 mars, il publie une nouvelle instance OCDS qui annonce l'attribution à la société B d'un contrat de 750 USD.
À travers ces deux instances, le service achat fournit des données en temps réel au fur et à mesure du processus de passation de marché.
À chaque nouvelle instance, le service achat met également à jour l'archive, qui rassemble toutes les instances à date. Dans l'archive finale, on trouve :
L'instance compilée contient toutes les informations concernant l'opportunité du marché, ainsi que les attributions, en utilisant le même schéma qu'une instance.
L'instance versionnée permet de voir facilement comment la description et le montant estimé ont changé à travers le temps.
[
{
"ocid": "ocds-213czf-000-00002",
"id": "ocds-213czf-000-00002-01-tender",
"date": "2016-01-01T09:30:00Z",
"language": "en",
"tag": [
"tender"
],
"initiationType": "tender",
"parties": [
{
"name": "Open Data Services",
"identifier": {
"scheme": "GB-COH",
"id": "09506232",
"legalName": "Open Data Services Co-operative",
"uri": "https://opencorporates.com/companies/gb/09506232"
},
"roles": [
"buyer"
],
"id": "GB-COH-09506232"
}
],
"buyer": {
"id": "GB-COH-09506232",
"name": "Open Data Services"
},
"tender": {
"id": "ocds-213czf-000-00002-01-tender",
"title": "Data merging tool",
"description": "Data merge tool.",
"status": "active",
"value": {
"amount": 1000,
"currency": "USD"
},
"procurementMethod": "open",
"awardCriteria": "bestProposal",
"submissionMethod": [
"electronicSubmission"
],
"tenderPeriod": {
"startDate": "2016-01-31T09:00:00Z",
"endDate": "2016-02-15T18:00:00Z"
},
"awardPeriod": {
"startDate": "2016-04-01T00:00:00Z",
"endDate": "2016-06-01T23:59:59Z"
}
}
}
]
[
{
"ocid": "ocds-213czf-000-00002",
"id": "ocds-213czf-000-00002-01-tender-amendment",
"date": "2016-02-05T10:30:00Z",
"language": "en",
"tag": [
"tenderAmendment"
],
"initiationType": "tender",
"parties": [
{
"name": "Open Data Services",
"identifier": {
"scheme": "GB-COH",
"id": "09506232",
"legalName": "Open Data Services Co-operative",
"uri": "https://opencorporates.com/companies/gb/09506232"
},
"roles": [
"buyer"
],
"id": "GB-COH-09506232"
}
],
"buyer": {
"id": "GB-COH-09506232",
"name": "Open Data Services"
},
"tender": {
"id": "ocds-213czf-000-00002-01-tender",
"title": "Data merging tool",
"description": "Creation of a data merging tool. The tool should by written in Python. Proposals should be submitted by e-mail.",
"status": "active",
"value": {
"amount": 2000,
"currency": "USD"
},
"procurementMethod": "open",
"awardCriteria": "bestProposal",
"submissionMethod": [
"electronicSubmission"
],
"tenderPeriod": {
"startDate": "2016-01-31T09:00:00Z",
"endDate": "2016-02-20T18:00:00Z"
},
"awardPeriod": {
"startDate": "2016-04-01T00:00:00Z",
"endDate": "2016-06-01T23:59:59Z"
},
"amendments": [
{
"id": "amendment-1",
"date": "2016-02-04T09:30:00Z",
"rationale": "Based on feedback from potential bidders, the total budget was increased by $1000, and the deadline extended",
"amendsReleaseID": "ocds-213czf-000-00002-01-tender",
"releaseID": "ocds-213czf-000-00002-01-tender-amendment"
}
]
}
}
]
[
{
"ocid": "ocds-213czf-000-00002",
"id": "ocds-213czf-000-00002-01-award1",
"date": "2016-03-01T09:30:00Z",
"language": "en",
"tag": [
"award"
],
"initiationType": "tender",
"parties": [
{
"name": "Open Data Services",
"identifier": {
"scheme": "GB-COH",
"id": "09506232",
"legalName": "Open Data Services Co-operative",
"uri": "https://opencorporates.com/companies/gb/09506232"
},
"roles": [
"buyer"
],
"id": "GB-COH-09506232"
}
],
"buyer": {
"id": "GB-COH-09506232",
"name": "Open Data Services"
},
"awards": [
{
"id": "ocds-213czf-000-00002-award-supplier-one",
"title": "Award of contract to create the data merging tool.",
"description": "Supplier 1 has been commissioned to create the merge tool. A separate contract will be awarded to write the documentation",
"status": "active",
"date": "2016-03-01T09:30:00Z",
"value": {
"amount": 750,
"currency": "USD"
}
}
]
}
]
[
{
"ocid": "ocds-213czf-000-00002",
"id": "ocds-213czf-000-00002-01-award2",
"date": "2016-03-03T09:30:00Z",
"language": "en",
"tag": [
"award"
],
"initiationType": "tender",
"parties": [
{
"name": "Open Data Services",
"identifier": {
"scheme": "GB-COH",
"id": "09506232",
"legalName": "Open Data Services Co-operative",
"uri": "https://opencorporates.com/companies/gb/09506232"
},
"roles": [
"buyer"
],
"id": "GB-COH-09506232"
}
],
"buyer": {
"id": "GB-COH-09506232",
"name": "Open Data Services"
},
"awards": [
{
"id": "ocds-213czf-000-00002-award-supplier-two",
"title": "Award of contract to create the data merging tool.",
"description": "Supplier 2 has been commissioned to create the documentation. A separate contract will be awarded to create the tool",
"status": "active",
"date": "2016-03-03T09:30:00Z",
"value": {
"amount": 750,
"currency": "USD"
}
}
]
}
]
{
"uri": "https://standard.open-contracting.org/examples/records/ocds-213czf-000-00002-merge.json",
"publisher": {
"scheme": "GB-COH",
"uid": "09506232",
"name": "Open Data Services Co-operative Limited",
"uri": "https://standard.open-contracting.org/examples/"
},
"publishedDate": "2016-03-05T13:02:00Z",
"license": "http://opendatacommons.org/licenses/pddl/1.0/",
"publicationPolicy": "https://github.com/open-contracting/sample-data/",
"version": "1.1",
"packages": [
"https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-award1.json",
"https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-award2.json",
"https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender.json",
"https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender-update.json",
"https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender-amendment.json"
],
"records": [
{
"ocid": "ocds-213czf-000-00002",
"releases": [
{
"url": "https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-award1.json#ocds-213czf-000-00002-01-award1",
"date": "2016-03-01T09:30:00Z",
"tag": [
"award"
]
},
{
"url": "https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-award2.json#ocds-213czf-000-00002-01-award2",
"date": "2016-03-03T09:30:00Z",
"tag": [
"award"
]
},
{
"url": "https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender.json#ocds-213czf-000-00002-01-tender",
"date": "2016-01-01T09:30:00Z",
"tag": [
"tender"
]
},
{
"url": "https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender-update.json#ocds-213czf-000-00002-01-tender-update",
"date": "2016-01-31T09:30:00Z",
"tag": [
"tenderUpdate"
]
},
{
"url": "https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender-amendment.json#ocds-213czf-000-00002-01-tender-amendment",
"date": "2016-02-05T10:30:00Z",
"tag": [
"tenderAmendment"
]
}
],
"compiledRelease": {
"tag": [
"compiled"
],
"id": "ocds-213czf-000-00002-2016-03-03T09:30:00Z",
"date": "2016-03-03T09:30:00Z",
"ocid": "ocds-213czf-000-00002",
"language": "en",
"initiationType": "tender",
"parties": [
{
"id": "GB-COH-09506232",
"name": "Open Data Services",
"identifier": {
"scheme": "GB-COH",
"id": "09506232",
"legalName": "Open Data Services Co-operative",
"uri": "https://opencorporates.com/companies/gb/09506232"
},
"roles": [
"buyer"
]
}
],
"buyer": {
"id": "GB-COH-09506232",
"name": "Open Data Services"
},
"tender": {
"id": "ocds-213czf-000-00002-01-tender",
"title": "Data merging tool",
"description": "Creation of a data merging tool. The tool should by written in Python. Proposals should be submitted by e-mail.",
"status": "active",
"value": {
"amount": 2000,
"currency": "USD"
},
"procurementMethod": "open",
"awardCriteria": "bestProposal",
"submissionMethod": [
"electronicSubmission"
],
"tenderPeriod": {
"startDate": "2016-01-31T09:00:00Z",
"endDate": "2016-02-20T18:00:00Z"
},
"awardPeriod": {
"startDate": "2016-04-01T00:00:00Z",
"endDate": "2016-06-01T23:59:59Z"
},
"amendments": [
{
"id": "amendment-1",
"date": "2016-02-04T09:30:00Z",
"rationale": "Based on feedback from potential bidders, the total budget was increased by $1000, and the deadline extended",
"amendsReleaseID": "ocds-213czf-000-00002-01-tender",
"releaseID": "ocds-213czf-000-00002-01-tender-amendment"
}
]
},
"awards": [
{
"id": "ocds-213czf-000-00002-award-supplier-one",
"title": "Award of contract to create the data merging tool.",
"description": "Supplier 1 has been commissioned to create the merge tool. A separate contract will be awarded to write the documentation",
"status": "active",
"date": "2016-03-01T09:30:00Z",
"value": {
"amount": 750,
"currency": "USD"
}
},
{
"id": "ocds-213czf-000-00002-award-supplier-two",
"title": "Award of contract to create the data merging tool.",
"description": "Supplier 2 has been commissioned to create the documentation. A separate contract will be awarded to create the tool",
"status": "active",
"date": "2016-03-03T09:30:00Z",
"value": {
"amount": 750,
"currency": "USD"
}
}
]
}
}
]
}
{
"uri": "https://standard.open-contracting.org/examples/records/ocds-213czf-000-00002-merge.json",
"publisher": {
"scheme": "GB-COH",
"uid": "09506232",
"name": "Open Data Services Co-operative Limited",
"uri": "https://standard.open-contracting.org/examples/"
},
"publishedDate": "2016-03-05T13:02:00Z",
"license": "http://opendatacommons.org/licenses/pddl/1.0/",
"publicationPolicy": "https://github.com/open-contracting/sample-data/",
"version": "1.1",
"packages": [
"https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-award1.json",
"https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-award2.json",
"https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender.json",
"https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender-update.json",
"https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender-amendment.json"
],
"records": [
{
"ocid": "ocds-213czf-000-00002",
"releases": [
{
"url": "https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-award1.json#ocds-213czf-000-00002-01-award1",
"date": "2016-03-01T09:30:00Z",
"tag": [
"award"
]
},
{
"url": "https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-award2.json#ocds-213czf-000-00002-01-award2",
"date": "2016-03-03T09:30:00Z",
"tag": [
"award"
]
},
{
"url": "https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender.json#ocds-213czf-000-00002-01-tender",
"date": "2016-01-01T09:30:00Z",
"tag": [
"tender"
]
},
{
"url": "https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender-update.json#ocds-213czf-000-00002-01-tender-update",
"date": "2016-01-31T09:30:00Z",
"tag": [
"tenderUpdate"
]
},
{
"url": "https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender-amendment.json#ocds-213czf-000-00002-01-tender-amendment",
"date": "2016-02-05T10:30:00Z",
"tag": [
"tenderAmendment"
]
}
],
"compiledRelease": {
"tag": [
"compiled"
],
"id": "ocds-213czf-000-00002-2016-03-03T09:30:00Z",
"date": "2016-03-03T09:30:00Z",
"ocid": "ocds-213czf-000-00002",
"language": "en",
"initiationType": "tender",
"parties": [
{
"id": "GB-COH-09506232",
"name": "Open Data Services",
"identifier": {
"scheme": "GB-COH",
"id": "09506232",
"legalName": "Open Data Services Co-operative",
"uri": "https://opencorporates.com/companies/gb/09506232"
},
"roles": [
"buyer"
]
}
],
"buyer": {
"id": "GB-COH-09506232",
"name": "Open Data Services"
},
"tender": {
"id": "ocds-213czf-000-00002-01-tender",
"title": "Data merging tool",
"description": "Creation of a data merging tool. The tool should by written in Python. Proposals should be submitted by e-mail.",
"status": "active",
"value": {
"amount": 2000,
"currency": "USD"
},
"procurementMethod": "open",
"awardCriteria": "bestProposal",
"submissionMethod": [
"electronicSubmission"
],
"tenderPeriod": {
"startDate": "2016-01-31T09:00:00Z",
"endDate": "2016-02-20T18:00:00Z"
},
"awardPeriod": {
"startDate": "2016-04-01T00:00:00Z",
"endDate": "2016-06-01T23:59:59Z"
},
"amendments": [
{
"id": "amendment-1",
"date": "2016-02-04T09:30:00Z",
"rationale": "Based on feedback from potential bidders, the total budget was increased by $1000, and the deadline extended",
"amendsReleaseID": "ocds-213czf-000-00002-01-tender",
"releaseID": "ocds-213czf-000-00002-01-tender-amendment"
}
]
},
"awards": [
{
"id": "ocds-213czf-000-00002-award-supplier-one",
"title": "Award of contract to create the data merging tool.",
"description": "Supplier 1 has been commissioned to create the merge tool. A separate contract will be awarded to write the documentation",
"status": "active",
"date": "2016-03-01T09:30:00Z",
"value": {
"amount": 750,
"currency": "USD"
}
},
{
"id": "ocds-213czf-000-00002-award-supplier-two",
"title": "Award of contract to create the data merging tool.",
"description": "Supplier 2 has been commissioned to create the documentation. A separate contract will be awarded to create the tool",
"status": "active",
"date": "2016-03-03T09:30:00Z",
"value": {
"amount": 750,
"currency": "USD"
}
}
]
},
"versionedRelease": {
"ocid": "ocds-213czf-000-00002",
"language": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "en"
}
],
"initiationType": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "tender"
}
],
"parties": [
{
"id": "GB-COH-09506232",
"name": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "Open Data Services"
}
],
"identifier": {
"scheme": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "GB-COH"
}
],
"id": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "09506232"
}
],
"legalName": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "Open Data Services Co-operative"
}
],
"uri": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "https://opencorporates.com/companies/gb/09506232"
}
]
},
"roles": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": [
"buyer"
]
}
]
}
],
"buyer": {
"id": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "GB-COH-09506232"
}
],
"name": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "Open Data Services"
}
]
},
"tender": {
"id": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "ocds-213czf-000-00002-01-tender"
}
],
"title": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "Data merging tool"
}
],
"description": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "Data merge tool."
},
{
"releaseID": "ocds-213czf-000-00002-01-tender-update",
"releaseDate": "2016-01-31T09:30:00Z",
"releaseTag": [
"tenderUpdate"
],
"value": "Creation of a data merging tool. The tool should by written in Python. Proposals should be submitted by e-mail."
}
],
"status": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "active"
}
],
"value": {
"amount": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": 1000
},
{
"releaseID": "ocds-213czf-000-00002-01-tender-amendment",
"releaseDate": "2016-02-05T10:30:00Z",
"releaseTag": [
"tenderAmendment"
],
"value": 2000
}
],
"currency": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "USD"
}
]
},
"procurementMethod": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "open"
}
],
"awardCriteria": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "bestProposal"
}
],
"submissionMethod": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": [
"electronicSubmission"
]
}
],
"tenderPeriod": {
"startDate": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "2016-01-31T09:00:00Z"
}
],
"endDate": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "2016-02-15T18:00:00Z"
},
{
"releaseID": "ocds-213czf-000-00002-01-tender-amendment",
"releaseDate": "2016-02-05T10:30:00Z",
"releaseTag": [
"tenderAmendment"
],
"value": "2016-02-20T18:00:00Z"
}
]
},
"awardPeriod": {
"startDate": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "2016-04-01T00:00:00Z"
}
],
"endDate": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "2016-06-01T23:59:59Z"
}
]
},
"amendments": [
{
"id": "amendment-1",
"date": [
{
"releaseID": "ocds-213czf-000-00002-01-tender-amendment",
"releaseDate": "2016-02-05T10:30:00Z",
"releaseTag": [
"tenderAmendment"
],
"value": "2016-02-04T09:30:00Z"
}
],
"rationale": [
{
"releaseID": "ocds-213czf-000-00002-01-tender-amendment",
"releaseDate": "2016-02-05T10:30:00Z",
"releaseTag": [
"tenderAmendment"
],
"value": "Based on feedback from potential bidders, the total budget was increased by $1000, and the deadline extended"
}
],
"amendsReleaseID": [
{
"releaseID": "ocds-213czf-000-00002-01-tender-amendment",
"releaseDate": "2016-02-05T10:30:00Z",
"releaseTag": [
"tenderAmendment"
],
"value": "ocds-213czf-000-00002-01-tender"
}
],
"releaseID": [
{
"releaseID": "ocds-213czf-000-00002-01-tender-amendment",
"releaseDate": "2016-02-05T10:30:00Z",
"releaseTag": [
"tenderAmendment"
],
"value": "ocds-213czf-000-00002-01-tender-amendment"
}
]
}
]
},
"awards": [
{
"id": "ocds-213czf-000-00002-award-supplier-one",
"title": [
{
"releaseID": "ocds-213czf-000-00002-01-award1",
"releaseDate": "2016-03-01T09:30:00Z",
"releaseTag": [
"award"
],
"value": "Award of contract to create the data merging tool."
}
],
"description": [
{
"releaseID": "ocds-213czf-000-00002-01-award1",
"releaseDate": "2016-03-01T09:30:00Z",
"releaseTag": [
"award"
],
"value": "Supplier 1 has been commissioned to create the merge tool. A separate contract will be awarded to write the documentation"
}
],
"status": [
{
"releaseID": "ocds-213czf-000-00002-01-award1",
"releaseDate": "2016-03-01T09:30:00Z",
"releaseTag": [
"award"
],
"value": "active"
}
],
"date": [
{
"releaseID": "ocds-213czf-000-00002-01-award1",
"releaseDate": "2016-03-01T09:30:00Z",
"releaseTag": [
"award"
],
"value": "2016-03-01T09:30:00Z"
}
],
"value": {
"amount": [
{
"releaseID": "ocds-213czf-000-00002-01-award1",
"releaseDate": "2016-03-01T09:30:00Z",
"releaseTag": [
"award"
],
"value": 750
}
],
"currency": [
{
"releaseID": "ocds-213czf-000-00002-01-award1",
"releaseDate": "2016-03-01T09:30:00Z",
"releaseTag": [
"award"
],
"value": "USD"
}
]
}
},
{
"id": "ocds-213czf-000-00002-award-supplier-two",
"title": [
{
"releaseID": "ocds-213czf-000-00002-01-award2",
"releaseDate": "2016-03-03T09:30:00Z",
"releaseTag": [
"award"
],
"value": "Award of contract to create the data merging tool."
}
],
"description": [
{
"releaseID": "ocds-213czf-000-00002-01-award2",
"releaseDate": "2016-03-03T09:30:00Z",
"releaseTag": [
"award"
],
"value": "Supplier 2 has been commissioned to create the documentation. A separate contract will be awarded to create the tool"
}
],
"status": [
{
"releaseID": "ocds-213czf-000-00002-01-award2",
"releaseDate": "2016-03-03T09:30:00Z",
"releaseTag": [
"award"
],
"value": "active"
}
],
"date": [
{
"releaseID": "ocds-213czf-000-00002-01-award2",
"releaseDate": "2016-03-03T09:30:00Z",
"releaseTag": [
"award"
],
"value": "2016-03-03T09:30:00Z"
}
],
"value": {
"amount": [
{
"releaseID": "ocds-213czf-000-00002-01-award2",
"releaseDate": "2016-03-03T09:30:00Z",
"releaseTag": [
"award"
],
"value": 750
}
],
"currency": [
{
"releaseID": "ocds-213czf-000-00002-01-award2",
"releaseDate": "2016-03-03T09:30:00Z",
"releaseTag": [
"award"
],
"value": "USD"
}
]
}
}
]
}
}
]
}
Spécifications¶
Champs abandonnés¶
Dans le schéma de l'instance, on déclare "omitWhenMerged": true
pour les champs qui seront abandonnés pendant la fusion. Il s'agit actuellement de id
, date
et tag
.
Pour une instance compilée :
Les champs et leurs valeurs sont abandonnés, parce que ce sont les métadonnées des instances individuelles. L'instance compilée les remplace avec ses propres métadonnées.
Pour une instance versionnée :
Les champs sont abandonnés, mais leurs valeurs sont déplacées afin d'indiquer de quelles instances proviennent les valeurs de chaque champ, comme décrit ci-dessous,
Si omitWhenMerged
est défini à false
, ignorez le champ.
Note
L'instance compilée utilise présentement le même schéma que le schéma d'instance, ce qui veut dire que les champs id
, date
and tag
sont obligatoires dans une instance compilée. Nous sommes ouverts à la discussion pour voir s'il faut changer ces champs obligatoires dans une instance compilée séparée, voir l'issue #330, et pour voir comment identifier et dater de façon pertinente les instances compilées et versionnées, dans l'issue #834.
Entre temps, une solution intermédiaire serait de définir tag
en ["compiled"]
, date
à la date de l'instance la plus récente, et id
en {ocid}-{date}
, comme dans la reference implementation de la routine de fusion.
Valeurs versionnées¶
Pour convertir la valeur du champ d'une instance en une valeur versionnée, vous devez :
Créer un objet JSON vide
Définir la valeur des champs
releaseID
,releaseDate
,releaseTag
sur la valeur des champsid
,date
,tag
de l'instanceDéfinir le champ
value
sur la valeur du champ dans l'instance.
Une valeur versionnée décrit donc la valeur d'un champ dans une instance spécifique.
Par exemple, dans l'exemple ci-dessus, la valeur estimée du marché à inscrire dans l'instance était de 1 000 USD (la valeur de tender/value/amount
était 1000
). En suivant les étapes décrites ci-dessus, la valeur versionnée serait :
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": 1000
}
Dans une instance versionnée, le plus souvent, la valeur d'un champ est remplacée par une liste (array) de valeurs versionnées qui devraient être classées chronologiquement par releaseDate
.
Par exemple, dans l'exemple ci-dessus, la valeur estimée était de 1 000 USD dans une instance publiée le 1er janvier 2016, puis de 2 000 USD dans une instance publiée le 5 février 2016. Dans une instance révisée, ces données pourraient être sérialisées ainsi :
{
"amount": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": 1000
},
{
"releaseID": "ocds-213czf-000-00002-01-tender-amendment",
"releaseDate": "2016-02-05T10:30:00Z",
"releaseTag": [
"tenderAmendment"
],
"value": 2000
}
],
"currency": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "USD"
}
]
}
{
"uri": "https://standard.open-contracting.org/examples/records/ocds-213czf-000-00002-merge.json",
"publisher": {
"scheme": "GB-COH",
"uid": "09506232",
"name": "Open Data Services Co-operative Limited",
"uri": "https://standard.open-contracting.org/examples/"
},
"publishedDate": "2016-03-05T13:02:00Z",
"license": "http://opendatacommons.org/licenses/pddl/1.0/",
"publicationPolicy": "https://github.com/open-contracting/sample-data/",
"version": "1.1",
"packages": [
"https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-award1.json",
"https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-award2.json",
"https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender.json",
"https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender-update.json",
"https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender-amendment.json"
],
"records": [
{
"ocid": "ocds-213czf-000-00002",
"releases": [
{
"url": "https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-award1.json#ocds-213czf-000-00002-01-award1",
"date": "2016-03-01T09:30:00Z",
"tag": [
"award"
]
},
{
"url": "https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-award2.json#ocds-213czf-000-00002-01-award2",
"date": "2016-03-03T09:30:00Z",
"tag": [
"award"
]
},
{
"url": "https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender.json#ocds-213czf-000-00002-01-tender",
"date": "2016-01-01T09:30:00Z",
"tag": [
"tender"
]
},
{
"url": "https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender-update.json#ocds-213czf-000-00002-01-tender-update",
"date": "2016-01-31T09:30:00Z",
"tag": [
"tenderUpdate"
]
},
{
"url": "https://standard.open-contracting.org/examples/releases/ocds-213czf-000-00002-01-tender-amendment.json#ocds-213czf-000-00002-01-tender-amendment",
"date": "2016-02-05T10:30:00Z",
"tag": [
"tenderAmendment"
]
}
],
"compiledRelease": {
"tag": [
"compiled"
],
"id": "ocds-213czf-000-00002-2016-03-03T09:30:00Z",
"date": "2016-03-03T09:30:00Z",
"ocid": "ocds-213czf-000-00002",
"language": "en",
"initiationType": "tender",
"parties": [
{
"id": "GB-COH-09506232",
"name": "Open Data Services",
"identifier": {
"scheme": "GB-COH",
"id": "09506232",
"legalName": "Open Data Services Co-operative",
"uri": "https://opencorporates.com/companies/gb/09506232"
},
"roles": [
"buyer"
]
}
],
"buyer": {
"id": "GB-COH-09506232",
"name": "Open Data Services"
},
"tender": {
"id": "ocds-213czf-000-00002-01-tender",
"title": "Data merging tool",
"description": "Creation of a data merging tool. The tool should by written in Python. Proposals should be submitted by e-mail.",
"status": "active",
"value": {
"amount": 2000,
"currency": "USD"
},
"procurementMethod": "open",
"awardCriteria": "bestProposal",
"submissionMethod": [
"electronicSubmission"
],
"tenderPeriod": {
"startDate": "2016-01-31T09:00:00Z",
"endDate": "2016-02-20T18:00:00Z"
},
"awardPeriod": {
"startDate": "2016-04-01T00:00:00Z",
"endDate": "2016-06-01T23:59:59Z"
},
"amendments": [
{
"id": "amendment-1",
"date": "2016-02-04T09:30:00Z",
"rationale": "Based on feedback from potential bidders, the total budget was increased by $1000, and the deadline extended",
"amendsReleaseID": "ocds-213czf-000-00002-01-tender",
"releaseID": "ocds-213czf-000-00002-01-tender-amendment"
}
]
},
"awards": [
{
"id": "ocds-213czf-000-00002-award-supplier-one",
"title": "Award of contract to create the data merging tool.",
"description": "Supplier 1 has been commissioned to create the merge tool. A separate contract will be awarded to write the documentation",
"status": "active",
"date": "2016-03-01T09:30:00Z",
"value": {
"amount": 750,
"currency": "USD"
}
},
{
"id": "ocds-213czf-000-00002-award-supplier-two",
"title": "Award of contract to create the data merging tool.",
"description": "Supplier 2 has been commissioned to create the documentation. A separate contract will be awarded to create the tool",
"status": "active",
"date": "2016-03-03T09:30:00Z",
"value": {
"amount": 750,
"currency": "USD"
}
}
]
},
"versionedRelease": {
"ocid": "ocds-213czf-000-00002",
"language": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "en"
}
],
"initiationType": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "tender"
}
],
"parties": [
{
"id": "GB-COH-09506232",
"name": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "Open Data Services"
}
],
"identifier": {
"scheme": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "GB-COH"
}
],
"id": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "09506232"
}
],
"legalName": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "Open Data Services Co-operative"
}
],
"uri": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "https://opencorporates.com/companies/gb/09506232"
}
]
},
"roles": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": [
"buyer"
]
}
]
}
],
"buyer": {
"id": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "GB-COH-09506232"
}
],
"name": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "Open Data Services"
}
]
},
"tender": {
"id": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "ocds-213czf-000-00002-01-tender"
}
],
"title": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "Data merging tool"
}
],
"description": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "Data merge tool."
},
{
"releaseID": "ocds-213czf-000-00002-01-tender-update",
"releaseDate": "2016-01-31T09:30:00Z",
"releaseTag": [
"tenderUpdate"
],
"value": "Creation of a data merging tool. The tool should by written in Python. Proposals should be submitted by e-mail."
}
],
"status": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "active"
}
],
"value": {
"amount": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": 1000
},
{
"releaseID": "ocds-213czf-000-00002-01-tender-amendment",
"releaseDate": "2016-02-05T10:30:00Z",
"releaseTag": [
"tenderAmendment"
],
"value": 2000
}
],
"currency": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "USD"
}
]
},
"procurementMethod": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "open"
}
],
"awardCriteria": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "bestProposal"
}
],
"submissionMethod": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": [
"electronicSubmission"
]
}
],
"tenderPeriod": {
"startDate": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "2016-01-31T09:00:00Z"
}
],
"endDate": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "2016-02-15T18:00:00Z"
},
{
"releaseID": "ocds-213czf-000-00002-01-tender-amendment",
"releaseDate": "2016-02-05T10:30:00Z",
"releaseTag": [
"tenderAmendment"
],
"value": "2016-02-20T18:00:00Z"
}
]
},
"awardPeriod": {
"startDate": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "2016-04-01T00:00:00Z"
}
],
"endDate": [
{
"releaseID": "ocds-213czf-000-00002-01-tender",
"releaseDate": "2016-01-01T09:30:00Z",
"releaseTag": [
"tender"
],
"value": "2016-06-01T23:59:59Z"
}
]
},
"amendments": [
{
"id": "amendment-1",
"date": [
{
"releaseID": "ocds-213czf-000-00002-01-tender-amendment",
"releaseDate": "2016-02-05T10:30:00Z",
"releaseTag": [
"tenderAmendment"
],
"value": "2016-02-04T09:30:00Z"
}
],
"rationale": [
{
"releaseID": "ocds-213czf-000-00002-01-tender-amendment",
"releaseDate": "2016-02-05T10:30:00Z",
"releaseTag": [
"tenderAmendment"
],
"value": "Based on feedback from potential bidders, the total budget was increased by $1000, and the deadline extended"
}
],
"amendsReleaseID": [
{
"releaseID": "ocds-213czf-000-00002-01-tender-amendment",
"releaseDate": "2016-02-05T10:30:00Z",
"releaseTag": [
"tenderAmendment"
],
"value": "ocds-213czf-000-00002-01-tender"
}
],
"releaseID": [
{
"releaseID": "ocds-213czf-000-00002-01-tender-amendment",
"releaseDate": "2016-02-05T10:30:00Z",
"releaseTag": [
"tenderAmendment"
],
"value": "ocds-213czf-000-00002-01-tender-amendment"
}
]
}
]
},
"awards": [
{
"id": "ocds-213czf-000-00002-award-supplier-one",
"title": [
{
"releaseID": "ocds-213czf-000-00002-01-award1",
"releaseDate": "2016-03-01T09:30:00Z",
"releaseTag": [
"award"
],
"value": "Award of contract to create the data merging tool."
}
],
"description": [
{
"releaseID": "ocds-213czf-000-00002-01-award1",
"releaseDate": "2016-03-01T09:30:00Z",
"releaseTag": [
"award"
],
"value": "Supplier 1 has been commissioned to create the merge tool. A separate contract will be awarded to write the documentation"
}
],
"status": [
{
"releaseID": "ocds-213czf-000-00002-01-award1",
"releaseDate": "2016-03-01T09:30:00Z",
"releaseTag": [
"award"
],
"value": "active"
}
],
"date": [
{
"releaseID": "ocds-213czf-000-00002-01-award1",
"releaseDate": "2016-03-01T09:30:00Z",
"releaseTag": [
"award"
],
"value": "2016-03-01T09:30:00Z"
}
],
"value": {
"amount": [
{
"releaseID": "ocds-213czf-000-00002-01-award1",
"releaseDate": "2016-03-01T09:30:00Z",
"releaseTag": [
"award"
],
"value": 750
}
],
"currency": [
{
"releaseID": "ocds-213czf-000-00002-01-award1",
"releaseDate": "2016-03-01T09:30:00Z",
"releaseTag": [
"award"
],
"value": "USD"
}
]
}
},
{
"id": "ocds-213czf-000-00002-award-supplier-two",
"title": [
{
"releaseID": "ocds-213czf-000-00002-01-award2",
"releaseDate": "2016-03-03T09:30:00Z",
"releaseTag": [
"award"
],
"value": "Award of contract to create the data merging tool."
}
],
"description": [
{
"releaseID": "ocds-213czf-000-00002-01-award2",
"releaseDate": "2016-03-03T09:30:00Z",
"releaseTag": [
"award"
],
"value": "Supplier 2 has been commissioned to create the documentation. A separate contract will be awarded to create the tool"
}
],
"status": [
{
"releaseID": "ocds-213czf-000-00002-01-award2",
"releaseDate": "2016-03-03T09:30:00Z",
"releaseTag": [
"award"
],
"value": "active"
}
],
"date": [
{
"releaseID": "ocds-213czf-000-00002-01-award2",
"releaseDate": "2016-03-03T09:30:00Z",
"releaseTag": [
"award"
],
"value": "2016-03-03T09:30:00Z"
}
],
"value": {
"amount": [
{
"releaseID": "ocds-213czf-000-00002-01-award2",
"releaseDate": "2016-03-03T09:30:00Z",
"releaseTag": [
"award"
],
"value": 750
}
],
"currency": [
{
"releaseID": "ocds-213czf-000-00002-01-award2",
"releaseDate": "2016-03-03T09:30:00Z",
"releaseTag": [
"award"
],
"value": "USD"
}
]
}
}
]
}
}
]
}
La structure de l'instance versionnée est décrite par le schéma d'instance versionnée; à noter que la valeur du champ ocid
n'est pas versionné.
Routine de fusion¶
Pour créer une instance compilée ou une instance versionnée, vous devez :
Rassembler toutes les instances ayant la même valeur pour le champ
ocid
Trier toutes les instances par ordre chronologique en utilisant le champ
date
Créer un objet JSON vide pour l'instance compilée ou versionnée
Fusionner chaque instance (input), dans l'ordre, dans l'objet JSON (output), comme décrit ci-dessous :
Valeurs des objets¶
L'instance est elle-même un objet, donc ce cas est rencontré en premier.
Si l'objet est vide dans input, ne rien faire. Pour chaque champ de l'objet dans input :
Pour une instance compilée :
Si le champ dans input a une valeur de
null
et que le champ est présent dans output, supprimer le champ de l'objet dans outputSi le champ n'est pas dans output, ajouter le champ à l'objet dans output, et le définir par sa valeur dans input
Si le champ est dans output, fusionner les valeurs du champ dans output et input conformément à la routine de fusion
Pour une instance versionnée :
Fusionner les valeurs du champ dans output et input conformément à la routine de fusion. Si le résultat est non nul et s'il n'a pas déjà été ajouté, ajouter le champ à l'objet dans output et définir comme valeur le résultat de la fusion
Valeurs littérales¶
Si la valeur dans input n'est ni un objet, ni une liste (array) :
Pour une instance compilée :
Si la valeur dans input est différente de la valeur dans output, remplacer la valeur dans *output par celle du champ dans input.
Pour une instance versionnée :
S'il n'y a pas de valeur dans output, définir la valeur du champ dans output sur une liste JSON vide, convertir la valeur dans input vers une valeur versionnée, et l'ajouter à la nouvelle liste JSON de valeurs versionnées dans output
Si la valeur dans input est différente de la valeur du champ
value
de la valeur versionnée la plus récente dans output, convertir la valeur dans 'input vers une valeur versionnée, et l'ajouter à la nouvelle liste de valeurs versionnées dans output
Listes (arrays)¶
Si la liste dans input contient autre chose que des objets, il faut traiter la liste comme une valeur littérale. Sinon, il y a deux sous-routines pour les listes d'objets : la fusion de liste intégrale (whole list merge) et la fusion par identifiant (identifier merge).
Fusion d'une liste intégrale¶
Un array d'input* doit être traité en tant que valeur littérale si le champ correspondant de la copie déréférencée du schéma d'instance contient un "array"
dans son type
et si l'un des éléments suivants est également vrai :
Le champ contient
"wholeListMerge": true
Le champ définit
items/type
, et ne contient rien d'autre que"object"
dansitems/type
Le champ a
"object"
dansitems/type
, définititems/properties
et n'a pas de champid
dansitems/properties
Fusion par identifiant¶
C'est la routine qui s'applique si les conditions ci-dessus ne sont pas remplies. Si la liste est vide dans input, ne rien faire. Pour chaque objet de la liste dans input :
Pour une instance compilée :
Si la liste dans output contient un objet avec la même valeur
id
que l'objet dans input, fusionner les objets correspondants dans input et output conformément à la routine de fusionSinon, ajouter l'objet dans input à la liste dans output
Pour une instance versionnée :
Si la liste dans output contient un objet avec la même valeur
id
que l'objet dans input, fusionner les objets correspondants dans input et output conformément à la routine de fusion, à l'exception du champid
, qui n'est pas versionné mais conservé à l'identique.Sinon, fusionner un objet JSON vide et l'objet dans input selon la routine de fusion, à l'exception du champ
id
, qui n'est pas versionné mais conservé à l'identique, et ajouter le résultat à la liste dans output
Note
Dans ce cas, afin de supprimer un objet d'un tableau (array), vous devez définir chacun de ses champs à null
. Nous vous invitons à discuter de la façon de supprimer des objets des tableaux dans le ticket #232.
Note
Dans le schéma de publication, "versionId": true
est déclaré sur les champs id
qui doivent être versionnés. Ceci n’est que pratique et pourrait être supprimé dans les futures versions d’OCDS. (voir le ticket #812). Si "versionId": true
est déclaré sur le champ de l'id
comme un objet dans un tableau (array), il est ignoré. "versionId": false
n'a pas de signification et est ignoré.
Implémentation de référence¶
A reference implementation of the merge routine is available in Python on GitHub. We strongly encourage any re-implementations to read its commented code and use its test cases, to ensure correctness.