MTAT.03.229 – Enterprise System Integration
Regular Exam – 13 January 2013
-­‐ The exam is open-book and open-laptop. Web browsing is allowed
-­‐ You are not allowed to communicate with anyone during the exam in any way
-­‐ You may submit your exam on paper, or electronically using the “Submit”
-­‐ If you find that there is not enough information in the text below and you need
to make additional assumptions, please write down your assumptions. APIs for Pharmak’s Sales Process
Pharmak Ltd. is a distributor of pharmaceutical products. Its client base is primarily composed of pharmacy chains that regularly place bulk orders for a range of pharmaceutical products. At present, Pharmak provides a Web-based interface allowing customers to query its product catalogue, to submit, track, and modify purchase orders, and to view invoices. Following requests from its larger customers, Pharmak is seeking to offer a fully programmatic interface to expose its sales process, all the way from receipt of purchase order to invoicing. The envisioned API shall allow the purchasing systems of Pharmak’s customers to directly retrieve all products in Pharmak’s catalogue or those products that match a given keyword (e.g. a product name or a name of an active ingredient). Such queries return a list of product catalogue entries, each consisting of a unique product code, a name, the active ingredients (e.g. dextromethorphan, levodopa or paracetamol), a description of the product, the price and availability. The availability of the product can be “immediate” or “on demand”. An “immediate” availability means that the product can be shipped in 1 or 2 business days, while “on demand” means that the product is generally not maintained on stock at Pharmak, but instead it needs to be ordered from a manufacturer and may take several business days to be shipped. The API will also allow customers to submit Purchase Orders (PO). A PO consists of one or more line items. Each line item corresponds to one product. A line item has a sequential number (1, 2, 3…), a product code, the required quantity of the product, the unit of measure (e.g. “per box”), the latest acceptable shipment date and the unit price. For example, one line item in an order may be for 300 boxes of Benadryl (code P0293) to be shipped by 31.01.2014 and payable at 1.53 euros per box. In addition to a list of line items, a PO contains the business identity code, the business name of the customer, and the identifier of the PO (this identifier is chosen by the customer). When a customer submits a PO, it expects first a simple acknowledgment indicating that the PO has been received. Within one business day, Pharmak must reply to the customer with a PO Response. A PO Response contains a reference to the original PO to which it refers, and a list of line item responses. A line item response includes the sequential number of the PO line item to which it refers (e.g. 1, 2, 3…) and a code “ACK” for “accepted” and “DEC” for “declined”. “ACK” means that that supplier agrees to provide the product in question. In this case, the line item response also indicates the expected shipment date. “DEC” means that the supplier cannot provide the product in question, in which case the response includes a note explaining the reason for rejection (e.g. because the price in the PO line is incorrect or because the product cannot be shipped by the requested “latest acceptable shipment date”). When Pharmak ships a line item of a PO (or several line items), it will communicate this shipment to customers programmatically by sending a Shipment Notification. A shipment notification contains a list of PO line items, where a PO line item references consists of a PO identifier, a line item number and an optional comment (a string). Similarly, when the customer receives the shipment, it will communicate this receipt to Pharmak programmatically by sending a Delivery Receipt, which also consists of PO line item references. A customer may request changes in their PO. To do so, they submit a PO Change Request. A PO Change Request includes a reference to the original PO and a list of PO Change line items. A PO Change line item contains the sequential number the PO line item to which the response refers (e.g. 1, 2, 3…), and the same data that a PO line item contains (product identifier, quantity, etc.). When a customer submits a PO Change Request, it expects first a simple acknowledgment indicating that the PO Change Request has been received. Within one business day, Pharmak must reply to the customer with a PO Change Response. A PO Change Response contains a reference to the original PO Change Request, and a list of line item responses (as defined previously). A change request for a PO line item cannot be accepted if the PO line item has already been shipped. Similarly, customers may request an order to be cancelled by sending a PO Cancellation Request. The procedure for handling PO Cancellation Requests is the same as for PO Change Requests. First the customer expects an immediate acknowledgment and within one business day it expects a PO Cancellation Response, which consists of a reference to the original PO Change to which it refers, and a list of line item responses, where a line item response includes a line item sequential number and either ACK (cancellation accepted) or DEC (cancellation declined). A PO line item cannot be cancelled if the corresponding line item has already been shipped. Customers may consult the status of a PO line item (“pending response”, “responded”, “shipped”, “delivered”, etc.) as well as the expected shipment date (if the shipment has not yet been made) or the actual shipment date (if the shipment has already been made). In some cases (e.g. incorrect or defective products), a customer may request from Pharmak an authorization to return a batch of delivered products. Such a Return Authorization contains a reference to a PO line item, the amount of products being returned and the unit of measure, and an explanation of the reason for the return. Upon receiving a Return Authorization, Pharmak shall either accept it or reject it by sending back a Return Authorization Response within two business days. In case of rejection, an explanation shall be included in the Return Authorization Response. Five business days after delivery of a PO line item, Pharmak shall send an Invoice for the PO line item in question to the customer. An invoice consists of a unique identifier, and a list of invoice lines. Each invoice line has a sequential number (1, 2, 3), a reference to a PO, a reference to the number of the line item in the PO (which is generally different from the sequential number of the invoice line itself) and the amount to be paid. Moreover, an invoice has a total and other data, which we will ignore in this exercise. An invoice may refer to line items belonging to multiple POs. If a return authorization is received after a PO line item has been invoiced, and the return authorization is accepted, Pharmak shall send a Credit Note to the customer to indicate that the amount corresponding to the returned products should not be paid (or shall be reimbursed by Pharmak if it has already been paid). A Credit Note contains a reference to an invoice, an invoice line number, a description of the reason for the credit, and the amount to be credited to the customer. Task  
Task 1 [4 points].
Design an architecture diagram for Pharmak’s sales information
system. The architecture diagram should show the main actors and interactions
involved in the above scenario.
Task 2 [6 points].
Design a domain model of Pharmak’s sales information system.
Task 3 [10 points]. Based on the domain model, design a resource model using the
RESTful service design method presented in the lectures.
Task 4 [5 points]. Specify a state machine capturing the lifecycle of a PO line item.
Each transition triggered by an external operation should be labelled with the name of
the operation, the corresponding HTTP verb and URL of the resource.
Task 5 [10 points]. Specify the RESTful API that Pharmak shall offer to each of its
Task 6 [10 point]. Specify the RESTful API that each customer shall offer to
Task 7 [5 points].
Write a concrete example (in JSON) of the HTTP body of a
response to a catalogue query containing two product catalogue entries, and a
concrete example of a PO containing two PO line items.
Note. All interactions between customers and Pharmak shall be specified as
operations using a RESTful style. The specification of a RESTful operation should
include the (relative) URL of the resource, the HTTP verb, and a brief description of
the input and the output if applicable. If an operation can only be applied when the
resource is in a certain state, the description of the operation should indicate in which
state(s) the operation can be applied.

Source: https://courses.cs.ut.ee/MTAT.03.229/2013_fall/uploads/Main/2014exam2.pdf

49 cfr special provisions lithium battery 188-190_docx

49 CFR Lithium Batteries/ 172.102 Special provisions 188,189,190 188 Small lithium cells and batteries. Lithium cells or batteries, including cells or batteries packed with or contained in equipment, are not subject to any other requirements of this subchapter if they meet all of the following: a. Primary lithium batteries and cells. (1) Primary lithium batteries and cells are forbidden fo

Microsoft word - managing your warfarin therapy-12-08.doc

Managing Your Warfarin (Coumadin®) A Patient’s Guide A Message To You The goal of anticoagulation therapy with warfarin (Coumadin®) is to decrease the clotting ability of your blood so that blood clots are prevented. The most important aspect of warfarin therapy is to keep your levels within a therapeutic range. If your level goes too low, you are at risk for blood clots

Copyright © 2010-2014 Medical Articles