سطر 3: |
سطر 3: |
| | | |
| ; <code>Lookup ( <var>name</var>: string, <var>count</var>: int, <var>index</var>: int )</code> | | ; <code>Lookup ( <var>name</var>: string, <var>count</var>: int, <var>index</var>: int )</code> |
− | : returns <var>count</var> number of listings having <var>name</var> as the name, starting with <var>index></var> | + | : returns <var>count</var> number of listings having <var>name</var> as the name, starting with <var>index</var> |
| | | |
− | ; <code>Insert_pending ( <var>name</var>: string, <var>name_arabic:</var> string, <var>expiry</var>: timestamp(YYYYMM), <var>package_state</var>: string(predefined), <var>governerate</var>: string(predefined), <var>description</var>: text, <var>photo</var>: binary )</code> | + | ; <code>Insert_pending ( <var>package_info</var>: [[#package_info|package_info]], <var>contact_info:</var> [[#contact_info|contact_info]], <var>accept_terms</var>: boolean )</code> |
| : initiates the process of inserting a listing. The final insertion into the index is completed with insert_instate. Where: | | : initiates the process of inserting a listing. The final insertion into the index is completed with insert_instate. Where: |
− | :* <var>name</var>: is the name of the medicine in Latin script | + | :* package_info : package information record as indicated in [[#package_info|package_info]] |
− | :* <var>name_arabic</var>: is the name of the medicine in Arabic script, if available (optional)
| + | :* contact_info : contact information record as indicated in [[#contact_info|contact_info]] |
− | :* <var>expiry</var>: the date of expiry of the medicine. The significance is in the precision of months, i.e YYYY/MM
| + | :* accept_terms : a flag indicating the acceptance of the terms of service. |
− | :* <var>package_state</var>: The case of the packaging of the medicine. Possible values are: <kbd>fabrica</kbd> | <kbd>opened</kbd> | <kbd>partial</kbd>
| + | |
− | :* <var>governrate</var>: the governerate where the package is to be picked up
| + | Listing data record is comprised of the following two data structures: |
− | :* <var>description</var>: a brief description, and/or notes by the submitter
| + | == <var>package_info</var> == |
| + | ; <var>name</var> <nowiki>:</nowiki> string |
| + | : the name of the medicine in Latin script |
| + | ; <var>name_arabic</var> <nowiki>:</nowiki> string |
| + | : the name of the medicine in Arabic script, if available (optional) |
| + | ; <var>expiry</var> <nowiki>:</nowiki> date |
| + | : the date of expiry of the medicine. The significance is in the precision of months, i.e YYYY/MM |
| + | ; <var>package_state</var> <nowiki>:</nowiki> string(<kbd>fabrica</kbd> | <kbd>opened</kbd> | <kbd>partial</kbd>) : The case of the packaging of the medicine. |
| + | ; <var>governrate</var> <nowiki>:</nowiki> string(predefined) |
| + | : the governerate where the package is to be picked up |
| + | ; <var>description</var> <nowiki>:</nowiki> text |
| + | : a brief description, and/or notes by the submitter |
| + | ; <var>photo</var> <nowiki>:</nowiki> blob |
| + | : an optional photograph of the package |
| + | |
| + | == <var>contact_info</var> == |
| + | ; <var>email_address</var> <nowiki>:</nowiki> string(email-address) |
| + | : |
| + | ; <var>name</var> <nowiki>:</nowiki> string |
| + | : |
| + | ; <var>phone_number</var> <nowiki>:</nowiki> string(phone-number) |
| + | : |
| + | ; <var>email_address_visible</var> <nowiki>:</nowiki> boolean |
| + | |
| </div> | | </div> |