IATI / IATI-Schemas

Schema development for the International Aid Transparency Initiative.
Other
15 stars 9 forks source link

Create New CRS elements #4

Closed caprenter closed 11 years ago

caprenter commented 11 years ago

Start at line 311 of this: https://docs.google.com/spreadsheet/ccc?key=0AnWngmdQt3stdDcwRHJxaXgtLWVoY2N5VWt4ck1oeGc#gid=1

davidmegginson commented 11 years ago

Added crs-add/aidtype-flag

Still to do: loan-terms, loan-status, and fss

caprenter commented 11 years ago

loan-terms has new codelists associated with it: https://docs.google.com/spreadsheet/ccc?key=0AnWngmdQt3stdDF3SDcwUEQwWnBuVE9IWS11bFVleWc#gid=0

There is an issue with the where these are to be attached to the element - in the codelists spec it looks like they are constraining the values of the text used within the element, rather than being added via an attribute as is usual with 'codelist' values. You may need to just check that the XML caters for the new codes.

This was flagged by Kit Wallace who is working on getting the 1.03 codelists together. https://github.com/KitWallace/AIDVIEW-DB/issues/120

davidmegginson commented 11 years ago

Agreed - loan-terms needs some cleanup. Here are my recommendations:

In other words, it would look like this:

<loan-terms variable-rate="4%" fixed-rate="3%">
  <repayment-type code="1">Equal Principal Payments (EPP)</repayment-type>
  <repayment-plan code="4">Quarterly</repayment-plan>
  <repayment-start-date iso-date="2014-01-01"/>
  <repayment-end-date iso-date="2020-12-31"/>
</loan-terms>

Where would be the right forum to bring these up? Should we just talk to Bill, or consult more widely?

bill-anderson commented 11 years ago

Structure is good for me but not name changes:

These elements will only be used by CRS reporters who are used to these names as CRS++ column definitions

If no variable rate is present rate-1 will be the fixed rate. Changing these names adds extra processing logic into IATI and from IATI to CRS++.

Start date and end date do not have the same meaning as first and final, so I would leave as is

Therefore, I suggest ...

<loan-terms rate-1="4%" rate-2="3%">
  <repayment-type code="1">Equal Principal Payments (EPP)</repayment-type>
  <repayment-plan code="4">Quarterly</repayment-plan>
  <repayment-first-date iso-date="2014-01-01"/>
  <repayment-final-date iso-date="2020-12-31"/>
</loan-terms>
caprenter commented 11 years ago

Edited Bill's comment to show the markup. N.B. Indent code by four spaces for the issue list to recognise it as such.

davidmegginson commented 11 years ago

working on loan-terms now ...

davidmegginson commented 11 years ago

Implemented loan-terms, following @bill-anderson 's modifications. Here's an example:

<loan-terms rate-1="4" rate-2="3">
  <repayment-type code="1">Equal Principal Payments (EPP)</repayment-type>
  <repayment-plan code="4">Quarterly</repayment-plan>
  <commitment-date iso-date="2013-09-01"/>
  <repayment-first-date iso-date="2014-01-01"/>
  <repayment-final-date iso-date="2020-12-31"/>
</loan-terms>

Pushed changes upstream in the 1.03dev git branch. Still need to do load-status and fss.

davidmegginson commented 11 years ago

Here's my planned markup for loan-status (no changes to what's in the spreadsheet):

<loan-status year="2014" currency="GBP" value-date="2013-05-24">
  <interest-received>200000</interest-received>
  <principal-outstanding>1500000</principal-outstanding>
  <principal-arrears>0</principal-arrears>
  <interest-arrears>0</interest-arrears>
  <principal-first-year>500000</principal-first-year>
  <interest-first-year>20000</interest-first-year>
</loan-status>
davidmegginson commented 11 years ago

Implemented crs-add/loan-status and pushed upstream to 1.03dev. Only crs-add/fss remaining.

davidmegginson commented 11 years ago

Here's my planned markup for crs-add/fss:

<fss extraction-date="2013-05-31" priority="true" phaseout-year="2016">
  <forecast year="2014" currency="GBP">10000</forecast>
  <forecast year="2015" currency="GBP">20000</forecast>
</fss>

Note that I've left out forecast/@value-date for now, since it's not in the standard, but I've created issue #13 to check whether we need it. I've also renamed fss/@phaseout to fss/@phaseout-year, for clarity.

davidmegginson commented 11 years ago

Added fss. Note that the standard does not state that fss appears inside crs-add -- please confirm.

@caprenter - can you please review the schema and confirm that this task is complete (all the crs-add markup is added)? See tests/activity-tests/should-pass/31-crs-add.xml for the test that covers this new markup.

bill-anderson commented 11 years ago

fss should not be inside crs-add

Creditor Reporting System and Forward Spending Survey are two separate OECD DAC products

caprenter commented 11 years ago

I've committed a change that should fix. Please review.

bill-anderson commented 11 years ago

Sorry guys, two elements need removing as per Herman's note - last comment in http://support.iatistandard.org/entries/22874883-Extend-the-IATI-standard-with-elements-to-cover-CRS-

loan-status/principal-first-year loan-status/interest-first-year

crs-add will only be used for future crs++ reporting, not backward looking, so these two can be dropped.

davidmegginson commented 11 years ago

Assigned to @caprenter for feedback and verification. All tests pass under tests/activity-tests/

caprenter commented 11 years ago

Looks good.